Flowdock
method

in_place_edit_for

Importance_0
v1.2.6 - Show latest stable - 0 notes - Class: ActionController::Macros::InPlaceEditing::ClassMethods
in_place_edit_for(object, attribute, options = {}) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_controller/macros/in_place_editing.rb, line 23
        def in_place_edit_for(object, attribute, options = {})
          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
Register or log in to add new notes.