Skip to content
This repository
Browse code

Do not need of ActionView::Helpers scope since we are inside

ActionView::Helpers
  • Loading branch information...
commit 8b4c74f77cd7fe3f2264c18f4ddc7dd495493c4b 1 parent ad44ece
Rafael Mendonça França rafaelfranca authored
6 actionpack/lib/action_view/helpers/date_helper.rb
@@ -213,7 +213,7 @@ def time_ago_in_words(from_time, include_seconds = false)
213 213 # 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
214 214 # all month choices are valid.
215 215 def date_select(object_name, method, options = {}, html_options = {})
216   - ActionView::Helpers::Tags::DateSelect.new(object_name, method, self, options, html_options).render
  216 + Tags::DateSelect.new(object_name, method, self, options, html_options).render
217 217 end
218 218
219 219 # Returns a set of select tags (one for hour, minute and optionally second) pre-selected for accessing a
@@ -251,7 +251,7 @@ def date_select(object_name, method, options = {}, html_options = {})
251 251 # 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
252 252 # all month choices are valid.
253 253 def time_select(object_name, method, options = {}, html_options = {})
254   - ActionView::Helpers::Tags::TimeSelect.new(object_name, method, self, options, html_options).render
  254 + Tags::TimeSelect.new(object_name, method, self, options, html_options).render
255 255 end
256 256
257 257 # Returns a set of select tags (one for year, month, day, hour, and minute) pre-selected for accessing a
@@ -287,7 +287,7 @@ def time_select(object_name, method, options = {}, html_options = {})
287 287 #
288 288 # The selects are prepared for multi-parameter assignment to an Active Record object.
289 289 def datetime_select(object_name, method, options = {}, html_options = {})
290   - ActionView::Helpers::Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render
  290 + Tags::DatetimeSelect.new(object_name, method, self, options, html_options).render
291 291 end
292 292
293 293 # Returns a set of html select-tags (one for year, month, day, hour, minute, and second) pre-selected with the
28 actionpack/lib/action_view/helpers/form_helper.rb
@@ -655,7 +655,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
655 655 # 'Accept <a href="/terms">Terms</a>.'.html_safe
656 656 # end
657 657 def label(object_name, method, content_or_options = nil, options = nil, &block)
658   - ActionView::Helpers::Tags::Label.new(object_name, method, self, content_or_options, options).render(&block)
  658 + Tags::Label.new(object_name, method, self, content_or_options, options).render(&block)
659 659 end
660 660
661 661 # Returns an input tag of the "text" type tailored for accessing a specified attribute (identified by +method+) on an object
@@ -677,7 +677,7 @@ def label(object_name, method, content_or_options = nil, options = nil, &block)
677 677 # # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" />
678 678 #
679 679 def text_field(object_name, method, options = {})
680   - ActionView::Helpers::Tags::TextField.new(object_name, method, self, options).render
  680 + Tags::TextField.new(object_name, method, self, options).render
681 681 end
682 682
683 683 # Returns an input tag of the "password" type tailored for accessing a specified attribute (identified by +method+) on an object
@@ -699,7 +699,7 @@ def text_field(object_name, method, options = {})
699 699 # # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" />
700 700 #
701 701 def password_field(object_name, method, options = {})
702   - ActionView::Helpers::Tags::PasswordField.new(object_name, method, self, options).render
  702 + Tags::PasswordField.new(object_name, method, self, options).render
703 703 end
704 704
705 705 # Returns a hidden input tag tailored for accessing a specified attribute (identified by +method+) on an object
@@ -717,7 +717,7 @@ def password_field(object_name, method, options = {})
717 717 # hidden_field(:user, :token)
718 718 # # => <input type="hidden" id="user_token" name="user[token]" value="#{@user.token}" />
719 719 def hidden_field(object_name, method, options = {})
720   - ActionView::Helpers::Tags::HiddenField.new(object_name, method, self, options).render
  720 + Tags::HiddenField.new(object_name, method, self, options).render
721 721 end
722 722
723 723 # Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object
@@ -738,7 +738,7 @@ def hidden_field(object_name, method, options = {})
738 738 # # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
739 739 #
740 740 def file_field(object_name, method, options = {})
741   - ActionView::Helpers::Tags::FileField.new(object_name, method, self, options).render
  741 + Tags::FileField.new(object_name, method, self, options).render
742 742 end
743 743
744 744 # Returns a textarea opening and closing tag set tailored for accessing a specified attribute (identified by +method+)
@@ -766,7 +766,7 @@ def file_field(object_name, method, options = {})
766 766 # # #{@entry.body}
767 767 # # </textarea>
768 768 def text_area(object_name, method, options = {})
769   - ActionView::Helpers::Tags::TextArea.new(object_name, method, self, options).render
  769 + Tags::TextArea.new(object_name, method, self, options).render
770 770 end
771 771
772 772 # Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object
@@ -828,7 +828,7 @@ def text_area(object_name, method, options = {})
828 828 # # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
829 829 #
830 830 def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
831   - ActionView::Helpers::Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render
  831 + Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render
832 832 end
833 833
834 834 # Returns a radio button tag for accessing a specified attribute (identified by +method+) on an object
@@ -850,7 +850,7 @@ def check_box(object_name, method, options = {}, checked_value = "1", unchecked_
850 850 # # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
851 851 # # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
852 852 def radio_button(object_name, method, tag_value, options = {})
853   - ActionView::Helpers::Tags::RadioButton.new(object_name, method, self, tag_value, options).render
  853 + Tags::RadioButton.new(object_name, method, self, tag_value, options).render
854 854 end
855 855
856 856 # Returns an input of type "search" for accessing a specified attribute (identified by +method+) on an object
@@ -876,7 +876,7 @@ def radio_button(object_name, method, tag_value, options = {})
876 876 # # => <input autosave="com.example.www" id="user_name" incremental="true" name="user[name]" onsearch="true" results="10" size="30" type="search" />
877 877 #
878 878 def search_field(object_name, method, options = {})
879   - ActionView::Helpers::Tags::SearchField.new(object_name, method, self, options).render
  879 + Tags::SearchField.new(object_name, method, self, options).render
880 880 end
881 881
882 882 # Returns a text_field of type "tel".
@@ -885,7 +885,7 @@ def search_field(object_name, method, options = {})
885 885 # # => <input id="user_phone" name="user[phone]" size="30" type="tel" />
886 886 #
887 887 def telephone_field(object_name, method, options = {})
888   - ActionView::Helpers::Tags::TelField.new(object_name, method, self, options).render
  888 + Tags::TelField.new(object_name, method, self, options).render
889 889 end
890 890 alias phone_field telephone_field
891 891
@@ -895,7 +895,7 @@ def telephone_field(object_name, method, options = {})
895 895 # # => <input id="user_homepage" size="30" name="user[homepage]" type="url" />
896 896 #
897 897 def url_field(object_name, method, options = {})
898   - ActionView::Helpers::Tags::UrlField.new(object_name, method, self, options).render
  898 + Tags::UrlField.new(object_name, method, self, options).render
899 899 end
900 900
901 901 # Returns a text_field of type "email".
@@ -904,7 +904,7 @@ def url_field(object_name, method, options = {})
904 904 # # => <input id="user_address" size="30" name="user[address]" type="email" />
905 905 #
906 906 def email_field(object_name, method, options = {})
907   - ActionView::Helpers::Tags::EmailField.new(object_name, method, self, options).render
  907 + Tags::EmailField.new(object_name, method, self, options).render
908 908 end
909 909
910 910 # Returns an input tag of type "number".
@@ -912,7 +912,7 @@ def email_field(object_name, method, options = {})
912 912 # ==== Options
913 913 # * Accepts same options as number_field_tag
914 914 def number_field(object_name, method, options = {})
915   - ActionView::Helpers::Tags::NumberField.new(object_name, method, self, options).render
  915 + Tags::NumberField.new(object_name, method, self, options).render
916 916 end
917 917
918 918 # Returns an input tag of type "range".
@@ -920,7 +920,7 @@ def number_field(object_name, method, options = {})
920 920 # ==== Options
921 921 # * Accepts same options as range_field_tag
922 922 def range_field(object_name, method, options = {})
923   - ActionView::Helpers::Tags::RangeField.new(object_name, method, self, options).render
  923 + Tags::RangeField.new(object_name, method, self, options).render
924 924 end
925 925
926 926 private
8 actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -154,7 +154,7 @@ module FormOptionsHelper
154 154 # key in the query string, that works for ordinary forms.
155 155 #
156 156 def select(object, method, choices, options = {}, html_options = {})
157   - ActionView::Helpers::Tags::Select.new(object, method, self, choices, options, html_options).render
  157 + Tags::Select.new(object, method, self, choices, options, html_options).render
158 158 end
159 159
160 160 # Returns <tt><select></tt> and <tt><option></tt> tags for the collection of existing return values of
@@ -188,7 +188,7 @@ def select(object, method, choices, options = {}, html_options = {})
188 188 # <option value="3">M. Clark</option>
189 189 # </select>
190 190 def collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {})
191   - ActionView::Helpers::Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render
  191 + Tags::CollectionSelect.new(object, method, self, collection, value_method, text_method, options, html_options).render
192 192 end
193 193
194 194 # Returns <tt><select></tt>, <tt><optgroup></tt> and <tt><option></tt> tags for the collection of existing return values of
@@ -239,7 +239,7 @@ def collection_select(object, method, collection, value_method, text_method, opt
239 239 # </select>
240 240 #
241 241 def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
242   - ActionView::Helpers::Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render
  242 + Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render
243 243 end
244 244
245 245 # Return select and option tags for the given object and method, using
@@ -273,7 +273,7 @@ def grouped_collection_select(object, method, collection, group_method, group_la
273 273 #
274 274 # time_zone_select( "user", "time_zone", ActiveSupport::TimeZone.all.sort, :model => ActiveSupport::TimeZone)
275 275 def time_zone_select(object, method, priority_zones = nil, options = {}, html_options = {})
276   - ActionView::Helpers::Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render
  276 + Tags::TimeZoneSelect.new(object, method, self, priority_zones, options, html_options).render
277 277 end
278 278
279 279 # Accepts a container (hash, array, enumerable, your type) and returns a string of option tags. Given a container

0 comments on commit 8b4c74f

Please sign in to comment.
Something went wrong with that request. Please try again.