Method: MuckEngine::FormBuilder#muck_select

Defined in:
lib/muck-engine/form_builder.rb

#muck_select(method, value_method, name_method, label, collection, options = {}, html_options = {}) ⇒ Object



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/muck-engine/form_builder.rb', line 179

def muck_select(method, value_method, name_method, label, collection, options = {}, html_options = {})

  # this code will look for a cookie that matches the control and set the value to the cookie value
  # if html_options.has_key?(:class)
  #     if html_options[:class].include?('retain')
  #         id = html_options[:id]
  #         @object.send("#{method}=", @template.cookies[id]) if @template.cookies.has_key? id
  #     end
  # end
  if !options[:tip].nil?
    html_options[:class] ||= ''
    html_options[:class] << add_space_to_css(html_options) + 'tip-field'    
  end
  self.collection_select(method, collection, value_method, name_method, options.merge(:object => @object, :label => label, :type => :choose_menu, :label_class => 'desc', :field_id => html_options[:id]), html_options)
end