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 following three variants of render code do not emit
> the keyword disabled to the html text:
> 
>    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}
> 
> Writing readonly instead if disabled (which seems to be undefined for
> select) also doesn't have any effects.
> 
> What is going wrong?

Are you sure !...@condition is true when you expect it to be?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
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 [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.

Reply via email to