if you want three values, then boolean true false cant work. I have
done this using 0 and 1 as below:
= select_tag :drop_ship, options_for_select([['',''],['Drop Ship','1'],
['Not Drop Ship','0']], params[:drop_ship])
You dont say how you want to use the tri-value in your code, but I use
this directly into a named_scope
has_finder :delisted, lambda {|*args|
args.first.blank? ? {:conditions=>nil} : {:conditions=>
['obsolete = ? ', args.first]}
which works fine because i am using mysql with boolean of 0=false,
1=true.
If you are checking the params value in the controller then you will
be looking to detect, blank?, '0' or '1'
Tonypm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---