<commit_before>module JohnHancock
  module Rails
    module FormBuilder
      include ActionView::Helpers::TagHelper

      def signature_field(attribute)
        tags = []
        tags << content_tag(:canvas, nil, class: 'Signature-visable Signature-pad', id: 'JohnHancock-canvas')
        tags << hidden_field(attribute.to_sym, id: 'JohnHancock-hidden')
        tags.join(',').html_safe
      end
    end
  end
end
<commit_msg>Add separate methods for canvas and hidden field<commit_after>module JohnHancock
  module Rails
    module FormBuilder
      include ActionView::Helpers::TagHelper

      def signature_canvas
        content_tag(:canvas, nil, id: 'JohnHancock-canvas')
      end

      def hidden_signature_field(attribute)
        hidden_field(attribute.to_sym, id: 'JohnHancock-hidden')
      end

      def signature_field(attribute)
        tags = []
        tags << signature_canvas
        tags << hidden_signature_field(attribute)
        tags.join(' ').html_safe
      end

    end
  end
end

{'fraction_non_alphanumeric': 0.08794466403162056, 'fraction_numerical': 0.0, 'mean_word_length': 2.911196911196911, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6186677', 'n_tokens_mistral': 293, 'n_tokens_neox': 282, 'n_words': 69}