Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/application.rb

Instance Method Summary collapse

Constructor Details

#initializeApplicationController

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_projectObject

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