Fix employee adding
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user