0

<%= f.text_area :message, :class => "share_ta" %>Rails 3.0.3 は有効なステートメントとして受け入れられないようで、次のように述べています。ActionView::Template::Error (undefined method 'message' for []:Array):

誰かが理由を知っていますか?

- 編集 -

これはform_forです

        <%= form_for :activity, :url => post_activity_path do |f| %>
            <div class="share_tb">
                <div class=share_t><span style="margin-left: 10px;">Tell us what's new <span style="color: #1fc2d1;"><%= @user.name %></span></span></div>
                <%= f.text_area :message, :class => "share_ta" %>
            </div>
            <div id=sm_share class=sm_share_rc>
                <ul>
                    <li style="color: #6b6b6b; font-size: 10pt; display: inline; list-style-type: none; float: right; margin-right: 10px; margin-top: 5px;"><%= f.check_box :everyone, "0", :class => "styled" %>Everyone</li>
                    <li style="color: #6b6b6b; font-size: 9pt; display: inline; list-style-type: none; height: 3px; float: left; margin-top: 5px;"><input type="checkbox" name="friends_only" value="3" class="styled">My Friends<br></li>
                </ul>
                 <%= f.submit "Share", :class => "sm_share_b" %>
                </div>
            </div>
        <% end %>
4

1 に答える 1

1

@アミット、

form_for をどのように指定しましたか?

編集: 元のポスターからの詳細情報を含む 2 回目。

そのはず

<%= form_for :activity, :url => acti_path do |f| %>
  <%= f.text_area :message, :class => "share_ta" %>
<% end %>
于 2010-12-29T07:05:40.703 に答える