This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 6a5076f1830f3e302ca7d1a25d4e68efd3ac5aca
tree f1399c79ee28eb2f77b364a5a0ee625ba95c7de5
parent 3f8309980ac37464494727493c5f7bcfbdda66b0 parent 49b316920a581ed066b82329326d811f11acd46f
tree f1399c79ee28eb2f77b364a5a0ee625ba95c7de5
parent 3f8309980ac37464494727493c5f7bcfbdda66b0 parent 49b316920a581ed066b82329326d811f11acd46f
inplace /
| name | age | message | |
|---|---|---|---|
| |
.DS_Store | ||
| |
.gitignore | ||
| |
MIT-LICENSE | Mon Aug 11 00:04:18 -0700 2008 | |
| |
README | Mon Aug 11 05:55:18 -0700 2008 | |
| |
README~ | Mon Aug 11 05:55:18 -0700 2008 | |
| |
Rakefile | Mon Aug 11 00:04:18 -0700 2008 | |
| |
generators/ | ||
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
nbproject/ | ||
| |
tasks/ | ||
| |
test/ | Mon Aug 11 00:04:18 -0700 2008 | |
| |
uninstall.rb | Mon Aug 11 00:04:18 -0700 2008 |
README
Inplace
=======
= 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 }
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!
Copyright (c) 2008 [Simplificator GmbH - www.simplificator.com], released under the MIT license








