Class: RubyMVC::RailsController
- Inherits:
-
AppController
- Object
- AppController
- RubyMVC::RailsController
- Defined in:
- lib/ruby_mvc/controllers/rails_controller.rb
Overview
This controller is used to assist in writing Ruby applications for an existing Rails application. All of the models will be automatically loaded based on the directory configuration of the Rails environment, and the database connection environment will be used.
This controller uses the following configuration settings to help it initialize itself:
rails_app - the location of the app directory of the Rails
application
config - the default database configuration to use by
the application
Instance Attribute Summary
Attributes inherited from AppController
Instance Method Summary collapse
Methods inherited from AppController
Methods included from LinkDispatcher
Constructor Details
This class inherits a constructor from RubyMVC::AppController
Instance Method Details
#setup ⇒ Object
46 47 48 49 50 51 |
# File 'lib/ruby_mvc/controllers/rails_controller.rb', line 46 def setup @rails_app = File.(File.join( File.dirname(@config_file), config["rails_app"])) connect_db load_models end |