Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Defined in:
- app/controllers/application.rb
Direct Known Subclasses
AdminController, BuildController, FilesController, ProjectController, ScmController
Instance Method Summary collapse
-
#initialize ⇒ ApplicationController
constructor
A new instance of ApplicationController.
-
#load_project ⇒ Object
Loads the project specified by the
id
parameter and places it into the @project variable.
Constructor Details
#initialize ⇒ ApplicationController
Returns a new instance of ApplicationController.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'app/controllers/application.rb', line 16 def initialize @sidebar_links = [ { :controller => "project", :action => "new", :image => "/images/24x24/box_new.png", :name => "New project" } ] @controller = self end |
Instance Method Details
#load_project ⇒ Object
Loads the project specified by the id
parameter and places it into the @project variable
29 30 31 32 |
# File 'app/controllers/application.rb', line 29 def load_project project_name = @params["id"] @project = DamageControl::Project.load(project_name) end |