Fix employee adding

This commit is contained in:
2015-02-27 11:09:16 +01:00
parent 6e805fed3e
commit bfc0f336d1
13 changed files with 137 additions and 21 deletions
@@ -30,7 +30,7 @@ module Suppliers
raise CanCan::AccessDenied unless current_employee.active?
@current_ability = ::Ability.new( current_employee )
Array.wrap(after_authentication_hooks).each do |hook|
next if hook[:options][:only].present? && !Array.wrap(hook[:options][:only].include?(action_name.to_sym))
next if hook[:options][:only].present? && !Array.wrap(hook[:options][:only]).include?(action_name.to_sym)
instance_eval &hook[:block]
end
end