[Rails] Re: How to disable a select?

2010-09-14 Thread pepe
> <%= f.select :attr, >                     @choices, >                     {}, >                     :include_blank => true, >                     :disabled => !...@condition %> It just happens that I'm working on the very same thing again and the problem with the above is that when the select is

[Rails] Re: How to disable a select?

2010-09-14 Thread pepe
>    f.select :attr, @choices, :include_blank => true, >   :disabled => !...@condition >    f.select :attr, @choices, {:include_blank => true}, >   :disabled => !...@condition >    f.select :attr, @choices, {:include_blank => true}, >   {:disabled => !...@condition} I remember struggling with this

Re: [Rails] Re: How to disable a select?

2010-09-13 Thread Srikanth Shreenivas
Try f.select :attr, @choices, {:include_blank => true}, { :disabled => !...@condition } On Mon, Sep 13, 2010 at 11:44 PM, Fritz Trapper wrote: > Marnen Laibow-Koser wrote: > > Are you sure !...@condition is true when you expect it to be? > > Yes, I checked it in the debugger. > -- > Posted via

[Rails] Re: How to disable a select?

2010-09-13 Thread Fritz Trapper
Marnen Laibow-Koser wrote: > Are you sure !...@condition is true when you expect it to be? Yes, I checked it in the debugger. -- 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 grou

[Rails] Re: How to disable a select?

2010-09-13 Thread Marnen Laibow-Koser
Fritz Trapper wrote: > I want to use form template to render data for show. Generally not a good idea from a UI point of view. Just use plain text for display, unless you want to allow editing. > > My idea is, to readonly/disable formelements. This works fine, except > with selects. The follow