【发布时间】:2015-10-25 20:04:16
【问题描述】:
我有这个表格:
<%= simple_form_for @article do |m| %>
<%= m.simple_fields_for :article_comment do |p| %>
<%= p.error_notification %>
<%= p.input :article_id, as: :hidden, input_html: {value: @article.id} %>
<div class="form-inputs">
<div class="row">
<div class="col-md-2 col-md-offset-1">
<%= p.label 'What do you think?', :class => 'indexsubtext' %>
</div>
<div class="col-md-9">
<%= p.input :comment, label: false, autofocus: true, :input_html => {:style=> 'width: 100%', :rows => 5, class: 'response-project'} %>
</div>
我想让输入框显示5行,但它只显示1。如何强制它提供5?
【问题讨论】: