Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Includes:
- ActionView::Helpers::JavaScriptHelper, ActionView::Helpers::PrototypeHelper, ActionView::Helpers::ScriptaculousHelper, ActionView::Helpers::TagHelper, Localization, UserSystem
- Defined in:
- app/controllers/application.rb
Direct Known Subclasses
BacklogsController, EstimatesController, GroupsController, PeriodsController, TasksController, UserController, WorksController
Constant Summary
Constants included from Localization
Localization::LOCALIZED_STRINGS
Class Method Summary collapse
Methods included from Localization
#l, load_localized_strings, #valid_language?
Class Method Details
.in_place_edit_for(object, attribute, options = {}) ⇒ Object
18 19 20 21 22 23 24 |
# File 'app/controllers/application.rb', line 18 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 |