Active Model Helpers
Action View Asset URL Helpers
Action View Atom Feed Helpers
Action View Cache Helper
Action View Capture Helper
Action View CSRF Helper
Action View Debug Helper
Provides a set of methods for making it easier to debug Rails objects.
Action View Form Helpers
Action View Form Option Helpers
Action View Form Tag Helpers
Action View Sanitize Helpers
Action View Translation Helpers
Namespace
- MODULE ActionView::Helpers::ActiveModelHelper
- MODULE ActionView::Helpers::ActiveModelInstanceTag
- MODULE ActionView::Helpers::AssetTagHelper
- MODULE ActionView::Helpers::AssetUrlHelper
- MODULE ActionView::Helpers::AtomFeedHelper
- MODULE ActionView::Helpers::CacheHelper
- MODULE ActionView::Helpers::CaptureHelper
- MODULE ActionView::Helpers::CsrfHelper
- MODULE ActionView::Helpers::DateHelper
- MODULE ActionView::Helpers::DebugHelper
- MODULE ActionView::Helpers::FormHelper
- MODULE ActionView::Helpers::FormOptionsHelper
- MODULE ActionView::Helpers::FormTagHelper
- MODULE ActionView::Helpers::JavaScriptHelper
- MODULE ActionView::Helpers::NumberHelper
- MODULE ActionView::Helpers::OutputSafetyHelper
- MODULE ActionView::Helpers::RecordTagHelper
- MODULE ActionView::Helpers::RenderingHelper
- MODULE ActionView::Helpers::SanitizeHelper
- MODULE ActionView::Helpers::TagHelper
- MODULE ActionView::Helpers::TextHelper
- MODULE ActionView::Helpers::TranslationHelper
- MODULE ActionView::Helpers::UrlHelper
- CLASS ActionView::Helpers::FormBuilder
Methods
Instance Public methods
select_month()
Link
# File actionview/lib/action_view/helpers/date_helper.rb, line 808 def select_month if @options[:use_hidden] || @options[:discard_month] build_hidden(:month, month || 1) else month_options = [] 1.upto(12) do |month_number| options = { value: month_number } options[:selected] = "selected" if month == month_number month_options << content_tag("option".freeze, month_name(month_number), options) + "\n" end build_select(:month, month_options.join) end end
select_year()
Link
# File actionview/lib/action_view/helpers/date_helper.rb, line 822 def select_year if !@datetime || @datetime == 0 val = "1" middle_year = Date.today.year else val = middle_year = year end if @options[:use_hidden] || @options[:discard_year] build_hidden(:year, val) else options = {} options[:start] = @options[:start_year] || middle_year - 5 options[:end] = @options[:end_year] || middle_year + 5 options[:step] = options[:start] < options[:end] ? 1 : -1 options[:leading_zeros] = false options[:max_years_allowed] = @options[:max_years_allowed] || 1000 if (options[:end] - options[:start]).abs > options[:max_years_allowed] raise ArgumentError, "There are too many years options to be built. Are you sure you haven't mistyped something? You can provide the :max_years_allowed parameter." end build_options_and_select(:year, val, options) end end