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.



19
20
21
22
23
24
25
26
27
28
29
# File 'app/controllers/application.rb', line 19

def initialize
  @sidebar_links = [
    {
      :controller => "project", 
      :action     => "new", 
      :image      => "/images/24x24/box_new.png",
      :name       => "New project"
    }
  ]
  @controller = self
end

Instance Method Details



37
38
39
40
# File 'app/controllers/application.rb', line 37

def breadcrumbs
  subpaths = @request.path.split(/\//)
#    subpaths.collect { |p| link_to_unless_current(p) }.links.join(" ")
end

#load_projectObject

Loads the project specified by the id parameter and places it into the @project variable



32
33
34
35
# File 'app/controllers/application.rb', line 32

def load_project
  project_name = @params["id"]
  @project = DamageControl::Project.load(project_name)
end