lib/air_blade/air_budd/form_builder.rb
# See this plugin's init.rb where we define this function to return true on
#   ActionView::Helpers::FormBuilder
See this plugin's init.rb where we define this function to return true on
ActionView::Helpers::FormBuilder
See this plugin ' s init . rb where we define this function to return true on ActionView :: Helpers :: FormBuilder
def collection_field( field_helper, method, choices, options, html_options = {})
        opts = options.stringify_keys
        ActionView::Helpers::InstanceTag.new( @object.class.name.downcase, method, self, nil, options[:object]).send( :add_default_name_and_id, opts )
        value = @object.send( method)
        content = if block_given?
          yield value, :id => opts['id'], :class => 'value'
        else
          wrapper.value( field_helper,
            link_to( method, value ), :id => opts['id'], :class => 'value')
        end
        wrapper.field( field_helper, 
          label_element(method, options, html_options) + content,
          attributes_for(method, field_helper) )
      end
def collection_field ( field_helper , method , choices , options , html_options = { } ) opts = options . stringify_keys ActionView :: Helpers :: InstanceTag . new ( @object . class . name . downcase , method , self , nil , options [ :object ] ) . send ( :add_default_name_and_id , opts ) value = @object . send ( method ) content = if block_given? yield value , :id => opts [ 'id' ] , :class => 'value' else wrapper . value ( field_helper , link_to ( method , value ) , :id => opts [ 'id' ] , :class => 'value' ) end wrapper . field ( field_helper , label_element ( method , options , html_options ) + content , attributes_for ( method , field_helper ) ) end
See this plugin's init.rb where we define this function to return true on
ActionView::Helpers::FormBuilder
See this plugin ' s init . rb where we define this function to return true on ActionView :: Helpers :: FormBuilder
field_helper
method
choices
options
html_options