Forum: Ruby on Rails Render Partial virtual pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bing T. (Guest)
on 2006-05-02 12:28
Hi guys,

We all know this snippet of code:

render(:partial => 'page')

here's my problem, I think I need to create a render where in the page
will be dynamic. example, page = username and my code will need to
render(:partial => 'username').

is this even possible?

My issue is with a chat application I'm trying to do. I already have
multiple div's and they all have unique names already. Now the problem
lies herein, I have a page with multiple div layers to represent each
person I'm talking to. When I send a message to one person, it goes into
my app and I have a listening module that will render whatever got
picked-up. But because my controllers renders to the same field of
render(:partial => 'page'), all of the divs get updated and the message
I send to one person gets sent to all people as well...

hope you guys could give me some insight.

Thanks,

Bing
This topic is locked and can not be replied to.