Skip to content

Instantly share code, notes, and snippets.

@chintanparikh
Created May 13, 2013 15:05
Show Gist options
  • Save chintanparikh/5568998 to your computer and use it in GitHub Desktop.
Save chintanparikh/5568998 to your computer and use it in GitHub Desktop.
form_helper.rb
module FormHelper
def phone_number_tag *args
args.each do |e|
if e.is_a? Hash and e.has_key? :class
e[:class] = e[:class] + " phone_number"
elsif e.is_a? Hash
e[:class] = "phone_number"
end
end
debugger
text_field_tag args
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment