Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Includes:
- ActionView::Helpers::JavaScriptHelper, ActionView::Helpers::PrototypeHelper, ActionView::Helpers::ScriptaculousHelper, ActionView::Helpers::TagHelper, ApplicationHelper, UrlForFix, UserSystem
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
AbsencesController, CustomersController, DashboardController, EstimatesController, GroupsController, PartiesController, PeriodsController, ProjectsController, PublicHolidaysController, SearchController, TaskFilesController, TasksController, UserController, WelcomeController, WorkLocksController, WorksController
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ApplicationController
constructor
A new instance of ApplicationController.
Methods included from ApplicationHelper
#back_or_link_to, #detour?, #display_notice, #h, #image_button_to, #image_detour_to, #image_link_to, #image_link_to_remote, #insert, #l, #record, #resolution_image, #t, #update_task, #with_detour
Constructor Details
#initialize ⇒ ApplicationController
Returns a new instance of ApplicationController.
19 20 21 22 23 24 |
# File 'app/controllers/application_controller.rb', line 19 def initialize super @application_title = t :project @application_description = t :project_description @sidebar = Sidebar.new(self) end |
Class Method Details
.in_place_edit_for(object, attribute, options = {}) ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/application_controller.rb', line 26 def self.in_place_edit_for(object, attribute, = {}) define_method("set_#{object}_#{attribute}") do @item = object.to_s.camelize.constantize.find(params[:id]) @item.update_attribute(attribute, params[:value]) render :text => @item.send(attribute).to_s end end |