From 9977e69ace545bfc7b4b293c409939c0f5167ced Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 11 Dec 2012 12:22:25 +0100 Subject: [PATCH] Fix ensure_owner --- app/controllers/asciicasts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/asciicasts_controller.rb b/app/controllers/asciicasts_controller.rb index ff6bf35..f6e7871 100644 --- a/app/controllers/asciicasts_controller.rb +++ b/app/controllers/asciicasts_controller.rb @@ -85,7 +85,7 @@ class AsciicastsController < ApplicationController end def ensure_owner! - if @asciicast.user != current_user + if current_user != @asciicast.user redirect_to asciicast_path(@asciicast), :alert => "You can't do that." end end