Help with in_place_edit from script.aculo.us

Hello,

I try to figure out how to use the script.aculo.us scripts and followed
the example on their webpage, but still getting errors, like “element
has no properties”.
I have the following code:

view/add.rhtml

<%= javascript_include_tag :defaults %>

<%= textilize(@fancy_text)

controller/shop_controller.rb

class ShopController < ApplicationController
require ‘in_place_editor’

def add
#get the text to display initially
@fancy_text = “Some fancy bold and emphasized text.”
end

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

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 %>”
end

end

I hope somebody can help me with this one.

Another question:

I am looking for an in_place_edit function (hopefully with
script.aculo.us) to be used with mysql-database. Does anybody have code
example on this?
I found a lot of examples on the web but none of them worked for me

Best regards,

Mark

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs