lib/effective_roles/engine.rb in effective_roles-2.0.5 vs lib/effective_roles/engine.rb in effective_roles-2.1.0
- old
+ new
@@ -1,7 +1,5 @@
-require 'effective_roles/set_current_user'
-
module EffectiveRoles
class Engine < ::Rails::Engine
engine_name 'effective_roles'
# Include acts_as_addressable concern and allow any ActiveRecord object to call it
@@ -9,21 +7,11 @@
ActiveSupport.on_load :active_record do
ActiveRecord::Base.extend(ActsAsRoleRestricted::Base)
end
end
- # Register the log_page_views concern so that it can be called in ActionController or elsewhere
- initializer 'effective_logging.log_changes_action_controller' do |app|
- Rails.application.config.to_prepare do
- ActiveSupport.on_load :action_controller do
- require 'effective_roles/set_current_user'
- ActionController::Base.include(EffectiveRoles::SetCurrentUser::ActionController)
- end
- end
- end
-
# Set up our default configuration options.
- initializer "effective_roles.defaults", :before => :load_config_initializers do |app|
+ initializer "effective_roles.defaults", before: :load_config_initializers do |app|
eval File.read("#{config.root}/config/effective_roles.rb")
end
end
end