Ok, I got it working now but it's reeeally ugly.

all file contents rendering, dynamic ID assignment
and JS functionality is done using inline rendering.

Often you need to use local variables to be able to use quotations.
For example:

# Ruby
render :inline =>
             "<%= '<div id=\"'+timestamp+'\" class=\"ruby\">
                 '+fcontents+'
               <\/div>
               <script type=\"text\/javascript\">
                   var editor = new Ajax.InPlaceEditor(id,
'+url_w_quotes+', {
                   //...
                   };
               <\/script>'%>",
               :locals => {:url_w_quotes => "\'/url/to/file\'" }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to