Skip to content
This repository

Restful inplace plugin for Rails

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 README
Octocat-spinner-32 README~
Octocat-spinner-32 Rakefile
Octocat-spinner-32 init.rb
Octocat-spinner-32 install.rb
Octocat-spinner-32 uninstall.rb

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

= Installation
script plugin/install ...

= 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 }
    format.html { render :action => "edit" }
    format.json { render :json => @artist, :status => SOMETHINGELSE_THAN_200}

Based on work by Rick:
Thanks a lot!

Copyright (c) 2008 [Simplificator GmbH -], released under the MIT license
Something went wrong with that request. Please try again.