Skip to content

Commit

Permalink
Accept phase in Ability initializer. Refs euruko2013#15.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosd committed Apr 21, 2013
1 parent 70c5895 commit b1e0e9a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1e0e9a

Please sign in to comment.