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
68 69 70 71 72 |
# File 'lib/sequel-rails/railtie.rb', line 68 def configure_sequel(app) app.config.sequel = Rails::Sequel::Configuration.for( Rails.root, app.config.database_configuration ) end |
#setup_controller_runtime(app) ⇒ Object
78 79 80 81 |
# File 'lib/sequel-rails/railtie.rb', line 78 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
74 75 76 |
# File 'lib/sequel-rails/railtie.rb', line 74 def setup_i18n_support(app) ::Sequel::Model.send :include, Rails::Sequel::I18nSupport end |
#setup_logger(app, logger) ⇒ Object
83 84 85 |
# File 'lib/sequel-rails/railtie.rb', line 83 def setup_logger(app, logger) app.config.sequel.logger=logger end |