RESTful Inplace Editor plugin

Plugin details

Inplace is a simple RESTful in place editor based and tested on Rails 2.1.0.

Websitehttp://simplificator.com/en/lab Repositorygit://github.com/simplificator/inplace.git Author Simplificator GmbH Tags Rest, editor LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install git://github.com/simplificator/inplace.git

Usage
-----------
In your View:

<%= editable_content_tag(:span, @artist, 'name', true, nil, {:style => 'border: 1px solid grey;'}, {:okText => 'save it'}) %>


In your Controller:

if @artist.update_attributes(params[:artist])
    format.html { redirect_to(@artist) }
    format.json { render :json => @artist }
else
    format.html { render :action => "edit" }
    format.json { render :json => @artist, :status => SOMETHINGELSE_THAN_200}
end


Based on work by Rick: http://www.bizmeetsdev.com/articles/2008/02/09/editable_content_tag
Thanks a lot!

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 3 months ago