Forum: Ruby on Rails Edit in Place

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Rath -. (Guest)
on 2006-02-18 02:56
I need help using In Place Editor by

def my_action
    #get the text to display initially
    @fancy_text = "Some fancy *bold* and _emphasized_ text."

def update_text
    #save your text here, and return the saved value
    @fancy_text = params[:value]
    render :layout => false, :inline => "<%= textilize( @fancy_text )

def return_unformatted_text
    #get your text and return it without the formatting
    @fancy_text = "Some fancy edited, *bold* and _emphasized_ text."
    render :layout => false, :inline => "<%= @fancy_text %>"

#view ( of my_action.rhtml )
<p id="editme2"><%= textilize( @fancy_text )</p>
<script language="JavaScript">
 new Ajax.InPlaceEditor('editme2', 'update_text',

They have this example at their site. What else should I do because if
doing just that, it doesn't work.

Rath -. (Guest)
on 2006-02-18 03:03
I have installed RedCloth already: gem install redcloth

Should I also include require 'redCloth' somewhere?
Luke R. (Guest)
on 2006-02-18 03:32
(Received via mailing list)
No need to do that.

Luke R.
Rath -. (Guest)
on 2006-02-18 06:05
Thanks Luke,

Finally it is working, I didn't add the controls.js file.
This topic is locked and can not be replied to.