English 中文(简体)
适当的论点是,采用一种模式?
原标题:Proper arguments for initializing a model in a view?
  • 时间:2009-10-05 18:45:21
  •  标签:

我的问答模板列出了答案,让mon明就一个问题补充新的答案。

但是,我不敢确定这一方针的新答案在什么地方以及如何开始:

<%= link_to  New answer , new_question_answer_path(@question, Answer.new) %>

摘自下文:

<p>
  <b>Body:</b>
  <%=h @question.body %>
</p>

<h1>Listing answers</h1>

<table>
  <tr>
    <th>Body</th>
  </tr>

<% @question.answers.each do |answer| %>
  <tr>
    <td><%=h answer.body %></td>
    <td><%= link_to  Show , answer %></td>
    <td><%= link_to  Edit , edit_answer_path(answer) %></td>
    <td><%= link_to  Destroy , answer, :confirm =>  Are you sure? , :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to  New answer , new_question_answer_path(@question, Answer.new) %>



<%= link_to  Edit , edit_question_path(@question) %> |
<%= link_to  Back , questions_path %>

www.un.org/Depts/DGACM/index_spanish.htm 如果我开始作出这样的新答复:

<%= link_to  New answer , new_question_answer_path(@question, Answer.new) %>

下一页的URL,在接到新答复的检查要求后封。

最佳回答

为此:

<%= link_to  New answer , new_question_answer_path(@question) %>
问题回答

暂无回答




相关问题