From b1e0e9a816c95d2bdc5a47548a3ac0bc1bdb6782 Mon Sep 17 00:00:00 2001 From: Nikos Dimitrakopoulos Date: Sun, 21 Apr 2013 21:30:59 +0300 Subject: [PATCH] Accept phase in Ability initializer. Refs #15. --- app/models/ability.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/ability.rb b/app/models/ability.rb index 3ac0ffc..b4e483f 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -3,9 +3,8 @@ class Ability # See the wiki for how to define abilities: # https://github.com/ryanb/cancan/wiki/Defining-Abilities - def initialize(user) + def initialize(user, phase = Phase.current) user ||= User.new - phase = Phase.current # Everyone can :see, :index