I am going through Agile Web Development with Rails and am having problems with the helper text_area form. In particular, I want the text area to be smaller (the form is submitted correctly and everything enters the database correctly). According to the book, this code should work:
<%= form_for(@request) do |f| %>
<div class="actions">
...
<div class="field">
<%= f.label :quote_details, "*Items required:" %>
<%= f.text_area :quote_details, :rows=>5, :cols=>40 %>
</div>
It seems that no matter what numbers I set for: rows or: cols, the box remains the same size by default. Instead of: rows and: cols, I used: size => "3x40" and size => "5x8" etc. But the box always remains the same size.
As an experiment, I tried
<%= f.text_field :quote_details, :size=>"300*39" %>
This changed the number of columns, but removed: size and put: rows or: cols has no effect (returns to the default size for the text field).
:
Rails text_area /
1, . , . - , , .
. , , . .
, rails 3.0.0 ruby ââ1.9.2p0 vista.