Im trying to makee an application that allows subcomments ie comments on
comments. The point where I get stuck is finding the comment that is
commented on.
This is an excerpt from subcomment.rb
def create
@comment = Comment.find(params[:id])
@comment.subcomments.create( :comment_id => @comment.id , :body =>
params[:subcomment][:body])
render :update do |page|
page.reload
end
end
The second line is obviously wrong (and bviously works if I give a value
for :id) so I think I might have the wrong approach.
Can anyone shed light on this issue.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.