lib/cantango/api/user/can.rb in cantango-0.9.4.1 vs lib/cantango/api/user/can.rb in cantango-0.9.4.2
- old
+ new
@@ -3,20 +3,20 @@
module User
module Can
include Ability
# Example: generated from types of accounts! (see below)
# def admin_can?(*args)
- # current_ability(:admin).can?(*args)
+ # current_user_ability(:admin).can?(*args)
# end
def self.included(base)
::CanTango.config.users.registered.each do |user|
base.class_eval %{
def #{user}_can? *args
- current_ability(:#{user}).can?(*args)
+ current_user_ability(:#{user}).can?(*args)
end
def #{user}_cannot? *args
- current_ability(:#{user}).cannot?(*args)
+ current_user_ability(:#{user}).cannot?(*args)
end
}
end
end
end