lib/iugusdk/engine.rb in iugusdk-1.0.0.alpha.3 vs lib/iugusdk/engine.rb in iugusdk-1.0.0.alpha.4
- old
+ new
@@ -1,7 +1,15 @@
module IuguSDK
class Engine < Rails::Engine
+ initializer "iugusdk.load_app_root" do |app|
+
+ IuguSDK.app_root = app.root
+
+ app.config.middleware.insert_before( app.config.session_store, SessionParameterMiddleware, app.config.session_options[:key])
+
+ end
+
initializer 'iugusdk.action_controller' do |app|
ActiveSupport.on_load(:action_controller) do
include IuguSDK::Controllers::Helpers
helper_method "search_user_account", "current_user_account", "is_active?", "body_classes", "current_account"
ActionController::Base.send(:include, IuguSDKBaseController)