module ActionView::Helpers::FormOptionsHelper
Public Instance Methods
job_function(object, method, options = {}, html_options = {})
click to toggle source
Return select and option tags for the given object and method, using job_functions_for_select
to generate the list of option tags.
# File lib/job_function.rb, line 14 def job_function(object, method, options = {}, html_options = {}) tag = if defined?(ActionView::Helpers::InstanceTag) && ActionView::Helpers::InstanceTag.instance_method(:initialize).arity != 0 InstanceTag.new(object, method, self, options.delete(:object)) else JobFunction.new(object, method, self, options) end tag.to_job_function_tag(options, html_options) end
job_functions_for_select(selected = nil)
click to toggle source
# File lib/job_function.rb, line 28 def job_functions_for_select(selected = nil) values = ::JobFunction::LIST return options_for_select(values, selected) end