Brijesh Shah wrote: > Hi > > I want to disable only one item of select box. > > I tried to used :disabled=>'item' but it disable select box itself. > > So anybody how to do this? > > Thanks > Brijesh Shah
Hi Brijesh, As per your need, i think you want to disable particular item from select box. so here is the solution, <%= select(:record, :property_id, Property.all.collect {|p| [ p.name, p.id ] }, :disabled => 2 [it's the id which you want to disable] ) %> Hope this will help you. Thanks, Priyanka Pathak -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---