Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

ActionView::Helpers
  • Loading branch information...
commit 8b4c74f77cd7fe3f2264c18f4ddc7dd495493c4b 1 parent ad44ece
@rafaelfranca rafaelfranca authored
View
6 actionpack/lib/action_view/helpers/date_helper.rb
@@ -213,7 +213,7 @@ def time_ago_in_words(from_time, include_seconds = false)
# 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 @@ def date_select(object_name, method, options = {}, html_options = {})
# 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 @@ def time_select(object_name, method, options = {}, html_options = {})
#
# 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
View
28 actionpack/lib/action_view/helpers/form_helper.rb
@@ -655,7 +655,7 @@ def fields_for(record_name, record_object = nil, options = {}, &block)
# 'Accept <a href="/terms">Terms</a>.'.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 @@ def label(object_name, method, content_or_options = nil, options = nil, &block)
# # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" />
#
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 @@ def text_field(object_name, method, options = {})
# # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" />
#
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 @@ def password_field(object_name, method, options = {})
# hidden_field(:user, :token)
# # => <input type="hidden" id="user_token" name="user[token]" value="#{@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 @@ def hidden_field(object_name, method, options = {})
# # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
#
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 @@ def file_field(object_name, method, options = {})
# # #{@entry.body}
# # </textarea>
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 @@ def text_area(object_name, method, options = {})
# # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
#
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 @@ def check_box(object_name, method, options = {}, checked_value = "1", unchecked_
# # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
# # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
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 @@ def radio_button(object_name, method, tag_value, options = {})
# # => <input autosave="com.example.www" id="user_name" incremental="true" name="user[name]" onsearch="true" results="10" size="30" type="search" />
#
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 @@ def search_field(object_name, method, options = {})
# # => <input id="user_phone" name="user[phone]" size="30" type="tel" />
#
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 @@ def telephone_field(object_name, method, options = {})
# # => <input id="user_homepage" size="30" name="user[homepage]" type="url" />
#
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 @@ def url_field(object_name, method, options = {})
# # => <input id="user_address" size="30" name="user[address]" type="email" />
#
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 @@ def email_field(object_name, method, options = {})
# ==== 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 @@ def number_field(object_name, method, options = {})
# ==== 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
View
8 actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -154,7 +154,7 @@ module FormOptionsHelper
# 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 <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 = {})
# <option value="3">M. Clark</option>
# </select>
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 <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
# </select>
#
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 @@ def grouped_collection_select(object, method, collection, group_method, group_la
#
# 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

0 comments on commit 8b4c74f

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