From ea8f30bd8dd9fd079f2d03c7394cbefaf8ff3032 Mon Sep 17 00:00:00 2001 From: Skud Date: Fri, 1 Feb 2013 10:25:54 +1100 Subject: [PATCH] tweaked cancan defaults (we don't have current_user) --- app/controllers/application_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e8065d950..42f566de4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,3 +1,9 @@ class ApplicationController < ActionController::Base protect_from_forgery + + # tweak CanCan defaults because we don't have a "current_user" method + def current_ability + @current_ability ||= AccountAbility.new(current_member) + end + end