Hi, This group is for discussing Prototype and script.aculo.us, most of us have never used Ruby or Rails. You're probably better off posting to the Rails group[1].
[1] http://groups.google.com/group/rubyonrails-talk Good luck with it, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Jul 27, 6:49 pm, Drrrrrr <[email protected]> wrote: > Hi, I am quite new to rails and can't use any rjs-templates. > The problem is, that he can't use/find the methods in that template > e.g. 'page' or 'replace_html'. I get an error message on these > methods. > > Here's what I got so far in my example: > > Controller: > ---- > class AjaxTestController < ApplicationController > layout 'application', :except => :say_hello > > def index > end > > def say_hello > @message = "Hello World" > respond_to do |format| > format.js > end > end > > end > ---- > > Layout > ---- > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang='en'> > <head> > <title>Ajax</title> > <%= javascript_include_tag :defaults %> > </head> > <body> > <%= yield %> > </body> > </html> > ---- > > index.html.erb > ---- > <h1>Helloworld#index</h1> > > <%= link_to_remote "Click", > :url => {:action => "say_hello"} %> > > <p id='message'>...</p> > ---- > > say_hello.rjs > --- > page.replace_html 'message', @message > page.visual_effect(:highlight, 'message', :duration => 0.5) > --- > > its quite simple but does not work anyway. I don't guess why it > behaves like this. If I use the controller for that ajax request, > everything is ok...it's just that template thing i can't fix. Anyone > got an idea where the problem might be? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
