lib/picky_color.rb
# Gather the picky_color related options and set them to another hash
# set defaults values if related options aren't set by the user
Gather the picky_color related options and set them to another hash
set defaults values if related options aren't set by the user
Gather the picky_color related options and set them to another hash set defaults values if related options aren ' t set by the user
def picky_color(object_name, method, options = {})     
      obj = options[:object] || instance_variable_get("@#{object_name}")
      picky_options = picky_color_process_options options
      begin
        input = ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object))
      rescue ArgumentError
        input = ActionView::Helpers::InstanceTag.new(object_name, method, self, nil, options.delete(:object))
      end
      return picky_color_output input.to_input_field_tag("text", options), object_name, method, nil, picky_options   
    end
def picky_color ( object_name , method , options = { } ) obj = options [ :object ] || instance_variable_get ( "@#{object_name}" ) picky_options = picky_color_process_options options begin input = ActionView :: Helpers :: InstanceTag . new ( object_name , method , self , options . delete ( :object ) ) rescue ArgumentError input = ActionView :: Helpers :: InstanceTag . new ( object_name , method , self , nil , options . delete ( :object ) ) end return picky_color_output input . to_input_field_tag ( "text" , options ) , object_name , method , nil , picky_options end
Gather the picky_color related options and set them to another hash
set defaults values if related options aren't set by the user
Gather the picky_color related options and set them to another hash set defaults values if related options aren ' t set by the user
# to keep it working with old rails versions:
object_name
method
options