I'm new to Ruby on Rails and came across a problem I could not solve
alone.
I've a pretty simple RJS file that looks like the following:

3.times do
  page.insert_html :bottom, 'messages', 'test'
end
page.call 'updateMessageWindow'

However this snippet gives a syntax error:

ActionView::TemplateError (compile error
D:/Eigene
Dateien/Programming/Web/AjaxChat/app/views/chat/update.js.rjs:1: syntax
error, unexpected tIDENTIFIER, expecting kEND
3.times do
  page.insert_html :bottom, 'messages', 'test'
end
page.call 'updateMessageWindow'
                                                                  ^) on
line #1 of chat/update.js.rjs:
1: 3.times do
  page.insert_html :bottom, 'messages', 'test'
end
page.call 'updateMessageWindow'


What is wrong with it? If I remove the last line (page.call
'updateMessageWindow') everything works as expected.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to