search for: confirm_owner

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

Did you mean: confirm_order
2006 Apr 21
9
Yet another dry question..
...@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 call this in my edit? I tr...