Hi Conrad! Thanks for the reply so soon, I just this second pinpointed
the problem. I placed render(:layout => false) on the last line of the
“read_message” action in the controller and now I can access the data in @the_message,
Also sometimes is better to use rjs file instead of rendering rhtml,
Like if you have loading indicator and you need update two or moder
DOM’s elements,
Sample:
in form_rhtml:
BlaBla…
Loading..
2
comments here
<%= form_remote_tag :url => {:controller => 'article', :action =>
'addComment', :id => article.id },
:loading => "Element.show('loading'),
:complete => "Element.hide('loading') } %>
... form goes here with end form tag,,....
Now in action you are saving posted comments, …
in addComment.rjs:
page.replace_html ‘total_comments’, @comments.size
page.replace_html ‘comments’, :partial => “comments”
Thats all,
(mayb i misspelled something, but that’s a way)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.