lib/alchemy/controller_actions.rb in alchemy_cms-3.1.1 vs lib/alchemy/controller_actions.rb in alchemy_cms-3.1.3
- old
+ new
@@ -1,12 +1,11 @@
module Alchemy
module ControllerActions
extend ActiveSupport::Concern
included do
- before_action :set_current_alchemy_site
- before_action :set_alchemy_language
+ prepend_before_action :set_alchemy_language, :set_current_alchemy_site
helper 'alchemy/pages'
helper_method :current_alchemy_user,
:alchemy_user_signed_in?,
@@ -64,11 +63,11 @@
@current_ability ||= begin
alchemy_permissions = Alchemy::Permissions.new(current_alchemy_user)
Alchemy.registered_abilities.each do |klass|
alchemy_permissions.merge(klass.new(current_alchemy_user))
end
- if (Object.const_get('Ability') rescue false)
- alchemy_permissions.merge(Ability.new(current_alchemy_user))
+ if (Object.const_get('::Ability') rescue false)
+ alchemy_permissions.merge(::Ability.new(current_alchemy_user))
end
alchemy_permissions
end
end