simplificator / inplace
- Source
- Commits
- Network (3)
- Issues (0)
- Downloads (0)
- Wiki (2)
- Graphs
-
Tree:
49b3169
commit 49b316920a581ed066b82329326d811f11acd46f
tree 35e6e1580ad6623db0a12205e7631808191434f1
parent 0f3ef3189367e160ca0c0fad3ec446ad289902df
tree 35e6e1580ad6623db0a12205e7631808191434f1
parent 0f3ef3189367e160ca0c0fad3ec446ad289902df
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 | Tue Sep 29 05:42:01 -0700 2009 | |
| |
install.rb | Tue Sep 29 05:42:01 -0700 2009 | |
| |
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

