lib/abilities/action_controller/base.rb in abilities-0.1.1 vs lib/abilities/action_controller/base.rb in abilities-0.1.2
- old
+ new
@@ -5,16 +5,16 @@
protected
%w(can? cannot?).each do |name|
define_method name do |action, subject|
- Abilities.send name, current_user, action, subject
+ Abilities.send name, instance_exec(&Abilities.configuration.fetcher), action, subject
end
end
def authorize!(action, subject)
raise Abilities::AccessDenied unless can? action, subject
end
end
end
-end
\ No newline at end of file
+end