diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-16 21:42:54 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-01-17 00:05:29 -0300 |
commit | 864d7575a3908f14ffc2830a6b2ea78a98756079 (patch) | |
tree | 40e4d95cc8aaeac5bf33d6b60146e699af0aafc2 /actionpack | |
parent | 4cfdd238ed3bc7d4f54faab923dbceeeb7a4bced (diff) | |
download | rails-864d7575a3908f14ffc2830a6b2ea78a98756079.tar.gz rails-864d7575a3908f14ffc2830a6b2ea78a98756079.tar.bz2 rails-864d7575a3908f14ffc2830a6b2ea78a98756079.zip |
Extract UrlField
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/url_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 0626ff4d85..110b6b433b 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -895,7 +895,7 @@ module ActionView # # => <input id="user_homepage" size="30" name="user[homepage]" type="url" /> # def url_field(object_name, method, options = {}) - InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("url", options) + ActionView::Helpers::Tags::UrlField.new(object_name, method, self, options).render end # Returns a text_field of type "email". diff --git a/actionpack/lib/action_view/helpers/tags.rb b/actionpack/lib/action_view/helpers/tags.rb index fcd8f6ff36..68bf8910c1 100644 --- a/actionpack/lib/action_view/helpers/tags.rb +++ b/actionpack/lib/action_view/helpers/tags.rb @@ -9,6 +9,7 @@ module ActionView 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 :UrlField, 'action_view/helpers/tags/url_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/url_field.rb b/actionpack/lib/action_view/helpers/tags/url_field.rb new file mode 100644 index 0000000000..1ffdfe0b3c --- /dev/null +++ b/actionpack/lib/action_view/helpers/tags/url_field.rb @@ -0,0 +1,8 @@ +module ActionView + module Helpers + module Tags + class UrlField < TextField #:nodoc: + end + end + end +end |