Created
May 13, 2013 15:05
-
-
Save chintanparikh/5568998 to your computer and use it in GitHub Desktop.
form_helper.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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