From 8b4c74f77cd7fe3f2264c18f4ddc7dd495493c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 17 Jan 2012 15:07:05 -0300 Subject: Do not need of ActionView::Helpers scope since we are inside ActionView::Helpers --- actionpack/lib/action_view/helpers/date_helper.rb | 6 ++--- actionpack/lib/action_view/helpers/form_helper.rb | 28 +++++++++++----------- .../lib/action_view/helpers/form_options_helper.rb | 8 +++---- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb index 1456f90520..f5077b034a 100644 --- a/actionpack/lib/action_view/helpers/date_helper.rb +++ b/actionpack/lib/action_view/helpers/date_helper.rb @@ -213,7 +213,7 @@ module ActionView # Note: If the day is not included as an option but the month is, the day will be set to the 1st to ensure that # all month choices are valid. def date_select(object_name, method, options = {}, html_options = {}) - ActionView::Helpers::Tags::DateSelect.new(object_name, method, self, options, html_options).render + Tags::DateSelect.new(object_name, method, self, options, html_options).render end # Returns a set of select tags (one for hour, minute and optionally second) pre-selected for accessing a @@ -251,7 +251,7 @@ module ActionView # Note: If the day is not included as an option but the month is, the day will be set to the 1st to ensure that # all month choices are valid. def time_select(object_name, method, options = {}, html_options = {}) - ActionView::Helpers::Tags::TimeSelect.new(object_name, method, self, options, html_options).render + Tags::TimeSelect.new(object_name, method, self, options, html_options).render end # Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a @@ -287,7 +287,7 @@ module ActionView # # The selects are prepared for multi-parameter assignment to an Active Record object. def datetime_select(object_name, method, options = {}, html_options = {}) - ActionView::Helpers::Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render + Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render end # Returns a set of html select-tags (one for year, month, day, hour, minute, and second) pre-selected with the diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 0beb6625f7..10277599a0 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -655,7 +655,7 @@ module ActionView # 'Accept Terms.'.html_safe # end def label(object_name, method, content_or_options = nil, options = nil, &block) - ActionView::Helpers::Tags::Label.new(object_name, method, self, content_or_options, options).render(&block) + Tags::Label.new(object_name, method, self, content_or_options, options).render(&block) end # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object @@ -677,7 +677,7 @@ module ActionView # # => # def text_field(object_name, method, options = {}) - ActionView::Helpers::Tags::TextField.new(object_name, method, self, options).render + Tags::TextField.new(object_name, method, self, options).render end # Returns an input tag of the "password" type tailored for accessing a specified attribute (identified by +method+) on an object @@ -699,7 +699,7 @@ module ActionView # # => # def password_field(object_name, method, options = {}) - ActionView::Helpers::Tags::PasswordField.new(object_name, method, self, options).render + Tags::PasswordField.new(object_name, method, self, options).render end # Returns a hidden input tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -717,7 +717,7 @@ module ActionView # hidden_field(:user, :token) # # => def hidden_field(object_name, method, options = {}) - ActionView::Helpers::Tags::HiddenField.new(object_name, method, self, options).render + Tags::HiddenField.new(object_name, method, self, options).render end # Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -738,7 +738,7 @@ module ActionView # # => # def file_field(object_name, method, options = {}) - ActionView::Helpers::Tags::FileField.new(object_name, method, self, options).render + Tags::FileField.new(object_name, method, self, options).render end # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+) @@ -766,7 +766,7 @@ module ActionView # # #{@entry.body} # # def text_area(object_name, method, options = {}) - ActionView::Helpers::Tags::TextArea.new(object_name, method, self, options).render + Tags::TextArea.new(object_name, method, self, options).render end # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object @@ -828,7 +828,7 @@ module ActionView # # # def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0") - ActionView::Helpers::Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render + Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render end # Returns a radio button tag for accessing a specified attribute (identified by +method+) on an object @@ -850,7 +850,7 @@ module ActionView # # => # # def radio_button(object_name, method, tag_value, options = {}) - ActionView::Helpers::Tags::RadioButton.new(object_name, method, self, tag_value, options).render + Tags::RadioButton.new(object_name, method, self, tag_value, options).render end # Returns an input of type "search" for accessing a specified attribute (identified by +method+) on an object @@ -876,7 +876,7 @@ module ActionView # # => # def search_field(object_name, method, options = {}) - ActionView::Helpers::Tags::SearchField.new(object_name, method, self, options).render + Tags::SearchField.new(object_name, method, self, options).render end # Returns a text_field of type "tel". @@ -885,7 +885,7 @@ module ActionView # # => # def telephone_field(object_name, method, options = {}) - ActionView::Helpers::Tags::TelField.new(object_name, method, self, options).render + Tags::TelField.new(object_name, method, self, options).render end alias phone_field telephone_field @@ -895,7 +895,7 @@ module ActionView # # => # def url_field(object_name, method, options = {}) - ActionView::Helpers::Tags::UrlField.new(object_name, method, self, options).render + Tags::UrlField.new(object_name, method, self, options).render end # Returns a text_field of type "email". @@ -904,7 +904,7 @@ module ActionView # # => # def email_field(object_name, method, options = {}) - ActionView::Helpers::Tags::EmailField.new(object_name, method, self, options).render + Tags::EmailField.new(object_name, method, self, options).render end # Returns an input tag of type "number". @@ -912,7 +912,7 @@ module ActionView # ==== Options # * Accepts same options as number_field_tag def number_field(object_name, method, options = {}) - ActionView::Helpers::Tags::NumberField.new(object_name, method, self, options).render + Tags::NumberField.new(object_name, method, self, options).render end # Returns an input tag of type "range". @@ -920,7 +920,7 @@ module ActionView # ==== Options # * Accepts same options as range_field_tag def range_field(object_name, method, options = {}) - ActionView::Helpers::Tags::RangeField.new(object_name, method, self, options).render + Tags::RangeField.new(object_name, method, self, options).render end private diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index 1252bbff51..e323350608 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -154,7 +154,7 @@ module ActionView # key in the query string, that works for ordinary forms. # def select(object, method, choices, options = {}, html_options = {}) - ActionView::Helpers::Tags::Select.new(object, method, self, choices, options, html_options).render + Tags::Select.new(object, method, self, choices, options, html_options).render end # Returns def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) - ActionView::Helpers::Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render + Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render end # Returns # def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {}) - ActionView::Helpers::Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render + Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render end # Return select and option tags for the given object and method, using @@ -273,7 +273,7 @@ module ActionView # # time_zone_select( "user", "time_zone", ActiveSupport::TimeZone.all.sort, :model => ActiveSupport::TimeZone) def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {}) - ActionView::Helpers::Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render + Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render end # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container -- cgit v1.2.3