ruby on rails - Text_area empty -


i'm trying display content of message class using text_area helper when load page text area blank.

<div id="messages"> <% message in @channel.messages %>        <h3><div class="title"><%=h message.description %></div></h3>       <div class="moderator">sent by: <%=h message.moderator %><br>on <%= message.created_at.strftime('%b %d, %y') %></div>       <div class="description">channel summary:<br><%= text_area("message",  simple_format(message.content), :cols => 40, :disabled=> true, :rows => 10) %><!/div>   <% end %>   </div> </div> 

you should use text_area_tag helper in case. text_area meant used when using form_for.

http://apidock.com/rails/actionview/helpers/formtaghelper/text_area_tag

<%= text_area_tag("message",  simple_format(message.content), :cols => 40, :disabled=> true, :rows => 10) %> 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -