Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Defined in:
- app/controllers/application.rb
Direct Known Subclasses
AdminController, FilesController, ProjectController, ScmController
Instance Method Summary collapse
- #breadcrumbs ⇒ Object
-
#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.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/application.rb', line 19 def initialize = [ { :controller => "project", :action => "new", :image => "/images/24x24/box_new.png", :name => "New project" } ] @controller = self end |
Instance Method Details
#breadcrumbs ⇒ Object
37 38 39 40 |
# File 'app/controllers/application.rb', line 37 def subpaths = @request.path.split(/\//) # subpaths.collect { |p| link_to_unless_current(p) }.links.join(" ") end |
#load_project ⇒ Object
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 |