search for: find_by_user_id_and_id

Displaying 1 result from an estimated 1 matches for "find_by_user_id_and_id".

2009 Feb 21
1
undefined method user_id
...#{RAILS_ROOT}/app/controllers/comments_controller.rb:8:in `new'' #{RAILS_ROOT}/app/controllers/comments_controller.rb:8:in `create'' This is my comments controller: class CommentsController < ApplicationController before_filter :login_required def create @photo = Photo.find_by_user_id_and_id(params[:user_id], params[:photo_id]) @comment = Comment.new(:user_id => @logged_in_user.id, :body => params[:comment][:body]) if @photo.comments << @comment flash[:noti...