rubyonrailsin

A Ruby and Rails talk

Tuesday, March 23, 2010


Re: [Rails] Re: Displaying a nested field as a label

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

On 23 March 2010 14:55, andrew <andrew.ggroups@gmail.com> wrote:
> That's my question!  How do you do that.
>
> <% a.text %> gives me this error:

You want just
<%= text %>
or probably
<%= h text %> dependant on where text is coming from

Colin

>
> NoMethodError in Sections#edit_acknowledgments
>
> Showing app/views/sections/edit_acknowledgments.html.erb where line
> #11 raised:
>
> Thanks!  -a
>
> On Mar 23, 3:47 am, Sharagoz -- <li...@ruby-forum.com> wrote:
>> If it is going to be read-only, why do you need to display it in a
>> text_area instead of directly on the page?
>>
>>
>>
>>
>>
>> andrew wrote:
>> > There is what I'm doing:  I want to display a series of text_area
>> > fields (read only) of which each has a checkbox.
>>
>> > Is this the best way to do it?
>>
>> > <% form_for (@section), :url =>{:action => "save_comments"} do |f| %>
>> >     <% f.fields_for :comments do |a|%>
>> >          <li>
>> >             <%= a.text_area :text, :read_only => 'true' %> <br>
>> >             <%= a.check_box :approval_boolean %> <br>
>> >             <hr>
>> >          </li>
>> >     <% end %>
>> > <% end %>
>>
>> > Is there any other way to display the field "text" other than above?
>>
>> > Thanks!
>>
>> --
>> Posted viahttp://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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive