diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-16 21:37:31 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-17 00:05:29 -0300 |
commit | 4cfdd238ed3bc7d4f54faab923dbceeeb7a4bced (patch) | |
tree | 77988837af22db347764b18c893861f62669d2e5 /actionpack | |
parent | 487471611b8eab1f1367fa2ef93aed77fb52dee4 (diff) | |
download | rails-4cfdd238ed3bc7d4f54faab923dbceeeb7a4bced.tar.gz rails-4cfdd238ed3bc7d4f54faab923dbceeeb7a4bced.tar.bz2 rails-4cfdd238ed3bc7d4f54faab923dbceeeb7a4bced.zip |
Extract TelField
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/form_helper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/tags.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/tags/tel_field.rb | 8 |
3 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 4348d36def..0626ff4d85 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -885,7 +885,7 @@ module ActionView # # => <input id="user_phone" name="user[phone]" size="30" type="tel" /> # def telephone_field(object_name, method, options = {}) - InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("tel", options) + ActionView::Helpers::Tags::TelField.new(object_name, method, self, options).render end alias phone_field telephone_field diff --git a/actionpack/lib/action_view/helpers/tags.rb b/actionpack/lib/action_view/helpers/tags.rb index a60d263cae..fcd8f6ff36 100644 --- a/actionpack/lib/action_view/helpers/tags.rb +++ b/actionpack/lib/action_view/helpers/tags.rb @@ -8,6 +8,7 @@ module ActionView autoload :HiddenField, 'action_view/helpers/tags/hidden_field' autoload :FileField, 'action_view/helpers/tags/file_field' autoload :SearchField, 'action_view/helpers/tags/search_field' + autoload :TelField, 'action_view/helpers/tags/tel_field' autoload :TextArea, 'action_view/helpers/tags/text_area' autoload :CheckBox, 'action_view/helpers/tags/check_box' autoload :RadioButton, 'action_view/helpers/tags/radio_button' diff --git a/actionpack/lib/action_view/helpers/tags/tel_field.rb b/actionpack/lib/action_view/helpers/tags/tel_field.rb new file mode 100644 index 0000000000..87c1f6b6b6 --- /dev/null +++ b/actionpack/lib/action_view/helpers/tags/tel_field.rb @@ -0,0 +1,8 @@ +module ActionView + module Helpers + module Tags + class TelField < TextField #:nodoc: + end + end + end +end |