On Aug 2, 2:01 pm, Neil Bye <li...@ruby-forum.com> wrote: > > def create > @story = Story.find(params[:story_id]) > @story.comments.create params[:comment] > format.js > end > > The log now says > > ArgumentError (too few arguments): > app/controllers/comments_controller.rb:12:in `format' > app/controllers/comments_controller.rb:12:in `create' > > So I think we need > > def create > @story = Story.find(params[:story_id]) > @story.comments.create params[:comment] > respond_to do |format| > format.js > end > end >
i was saying you need neither - def create @story = Story.find(params[:story_id]) @story.comments.create params[:comment] 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.