Displaying 1 result from an estimated 1 matches for "confirm_us".
Did you mean:
confirm_13
2006 Apr 21
9
Yet another dry question..
...if @owner.user_id == @user.id
@product = Product.find(params[:id])
else
flash[:notice] = ''Sorry, you''re not the owner.''
redirect_to :action => ''list''
end
end
Ok, so to simplify it, I wrote a private method called confirm_user:
def confirm_owner
@owner = Product.find(params[:id].to_i)
unless @owner.user_id == @user.id
flash[:notice] = ''Sorry, you''re not the owner.''
redirect_to :action => ''list''
end
end
Now, how can I cal...