To those having the same with problem with nested resources, this is
the solution:

  def create
    @comment = @site_update.comments.new
    @comment.attributes = params[:comment]
    @comment.author = current_user

    if @comment.save
      respond_with @site_update, @comment, :include => :author
    else
      respond_with @site_update, @comment.errors
    end
  end

-- 
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.

Reply via email to