Displaying 1 result from an estimated 1 matches for "post_reply".
Did you mean:
port_reply
2007 Jan 01
0
Simple question on inserting child data
...ave:
class MainController < ApplicationController
def index
#display a list of the posts
@posts = Post.find(:all, :order => "id desc")
end
def reply
#display the post that is being replied to
@post = Post.find(params[:id])
@reply = Reply.new
end
def post_reply
@reply = Reply.find(params[:id])
redirect_to :index
end
end
-------------------
Here if the form
<h2><%= @post.title %></h2>
<p>
<%= @post.content%>
</p>
<% form_for :reply, :url => {:action => :post_reply} do |form| %>
<label...