class RecurringSelectHelper::RecurringSelectTag

Public Class Methods

new(object, method, template_object, default_schedules = nil, options = {}, html_options = {}) click to toggle source
Calls superclass method
# File lib/helpers/recurring_select_helper.rb, line 97
def initialize(object, method, template_object, default_schedules = nil, options = {}, html_options = {})
  @default_schedules = default_schedules
  @choices = @choices.to_a if @choices.is_a?(Range)
  @method_name = method.to_s
  @object_name = object.to_s
  @html_options = recurring_select_html_options(html_options)
  @template_object = template_object
  add_default_name_and_id(@html_options)

  super(object, method, template_object, options)
end

Public Instance Methods

render() click to toggle source
# File lib/helpers/recurring_select_helper.rb, line 109
def render
  option_tags = add_options(recurring_options_for_select(value, @default_schedules, @options), @options, value)
  select_content_tag(option_tags, @options, @html_options)
end