Sha256: 1e58709c4ee548d60c57d6b6099fa8ef3488c0dbe25f975faf62f852e23e5ffa

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

module IuguSDK
  class Engine < Rails::Engine

    initializer "iugusdk.load_app_root" do |app|
      app.config.assets.precompile += %w( iugu-sdk.css )
       IuguSDK.app_root = app.root
       app.class.configure do
         config.paths['db/migrate'] += IuguSDK::Engine.paths['db/migrate'].existent
       end

       #app.config.middleware.insert_before( app.config.session_store, SessionParameterMiddleware, app.config.session_options[:key])
       # app.middleware.insert_before( app.config.session_store, IuguSDK::SessionParameterMiddleware, app.config.session_options[:key])
       # config.middleware.insert_before( ActionDispatch::Session::CookieStore, 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)
      end
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
iugusdk-1.0.0.alpha.16 lib/iugusdk/engine.rb
iugusdk-1.0.0.alpha.14 lib/iugusdk/engine.rb
iugusdk-1.0.0.alpha.13 lib/iugusdk/engine.rb
iugusdk-1.0.0.alpha.12 lib/iugusdk/engine.rb
iugusdk-1.0.0.alpha.11 lib/iugusdk/engine.rb