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 9574ba62bb37d381ff448e040f69e632795d1cd9
tree 9ca9aa1ccfd39a66a7d6272222e8549a8c407220
parent be28467795c0e45f60be1ba2dfe0cfe5665a2691
tree 9ca9aa1ccfd39a66a7d6272222e8549a8c407220
parent be28467795c0e45f60be1ba2dfe0cfe5665a2691
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README | Fri May 02 22:15:05 -0700 2008 | |
| |
Rakefile | ||
| |
init.rb | Fri Apr 25 23:17:41 -0700 2008 | |
| |
install.rb | Fri Apr 25 22:18:09 -0700 2008 | |
| |
javascripts/ | ||
| |
lib/ | ||
| |
tasks/ | ||
| |
test/ | ||
| |
uninstall.rb | Fri Apr 25 22:18:09 -0700 2008 |
JrailsInPlaceEditing
====================
Edit in place for jRails.
Example
=======
# Controller
class BlogController < ApplicationController
in_place_edit_for :post, :title
end
# Customize the action that update the value
class BlogController < ApplicationController
# set_#{object}_#{title}
def set_post_title
post = Post.find(params[:id])
post.title = params[:value] # Name of parameter is always 'value'.
post.save
# It should render a text
render :text => post.title
end
end
# View
<%= in_place_editor_field :post, :title %>
# Pass some options
<%= in_place_editor_field :post, :title, {}, {:field_type => 'textarea', :textarea_cols => 25, :textarea_rows => 10}%>
<%= in_place_editor_field :post, :title, {}, {:field_type => 'textarea', :textarea_rows => 10}%>
For more details, see comments in jrails_in_place_macros.rb.
Dual Licenses
================
This plugin uses implementaion of in-place editor for jQuery, created by Rakuto Furutani
Implementation of in-place editor for jQuery that created by David Hauenstein is used.
Thank you.
Copyright (c) 2008 Rakuto Furutani, released under the MIT license












