Class: Rails::Sequel::Railtie
- Inherits:
-
Railtie
- Object
- Railtie
- Rails::Sequel::Railtie
- Defined in:
- lib/sequel-rails/railtie.rb
Instance Method Summary collapse
-
#configure_sequel(app) ⇒ Object
Support overwriting crucial steps in subclasses.
- #setup_controller_runtime(app) ⇒ Object
- #setup_i18n_support(app) ⇒ Object
- #setup_logger(app, logger) ⇒ Object
Instance Method Details
#configure_sequel(app) ⇒ Object
Support overwriting crucial steps in subclasses
71 72 73 74 75 |
# File 'lib/sequel-rails/railtie.rb', line 71 def configure_sequel(app) app.config.sequel = Rails::Sequel::Configuration.for( Rails.root, app.config.database_configuration ) end |
#setup_controller_runtime(app) ⇒ Object
81 82 83 84 |
# File 'lib/sequel-rails/railtie.rb', line 81 def setup_controller_runtime(app) require 'sequel-rails/railties/controller_runtime' ActionController::Base.send :include, Rails::Sequel::Railties::ControllerRuntime end |
#setup_i18n_support(app) ⇒ Object
77 78 79 |
# File 'lib/sequel-rails/railtie.rb', line 77 def setup_i18n_support(app) ::Sequel::Model.send :include, Rails::Sequel::I18nSupport end |
#setup_logger(app, logger) ⇒ Object
86 87 88 |
# File 'lib/sequel-rails/railtie.rb', line 86 def setup_logger(app, logger) app.config.sequel.logger=logger end |