RoR set value for textarea?

% remote_form_for ... do |f| %> "my default value" %.

That seems to work fine. Thank you – Brian Aug 27 '10 at 1:46.

The FormHelper text_area method takes a second argument to specify the method which returns the body of a textarea. From the documentation linked above: text_area(:post, :body, :cols => 20, :rows => 40) # => # #{@post. Body} # text_area(:comment, :text, :size => "20x30") # => # #{@comment.

Text} # text_area(:application, :notes, :cols => 40, :rows => 15, :class => 'app_input') # => # #{@application. Notes} # text_area(:entry, :body, :size => "20x20", :disabled => 'disabled') # => # #{@entry. Body}.

– Brian Aug 26 '10 at 22:45 @Brian No, your model should handle that. For example using the method :text, would invoke the method text on your message model, assuming @message contains an instance of your model.As you can see from the example, text_area(:post, :body) invokes the method @post. Body – injekt Aug 26 '10 at 22:51 Well, I added a method to my model like so def default_text "testing" end Then But get the following error "undefined method `merge' for :default_text:Symbol" – Brian Aug 26 '10 at 23:15.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions