Forum: Ruby on Rails include contents of one rhtml in another

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.
Scott S. (Guest)
on 2006-04-19 20:11
Hi

I have a rhtml documment in views/account/login.rhtml

I want to include the contents of login.rhtml in
views/welcome/index.rhtml

any suggestions on how this can be done?

Thanks
Scott
Charlie B. (Guest)
on 2006-04-19 20:45
(Received via mailing list)
Turn the shared content into a partial.  Google ruby rails partials and
I'm sure you'll see a ton of demonstrations.

Charlie B.
www.recentrambles.com
Daniel H. (Guest)
on 2006-04-19 20:54
(Received via mailing list)
I believe this can also be done by using render_component - though if
you
want to render a login box you'll probably want to use a partial.
Charlie B. (Guest)
on 2006-04-19 20:58
(Received via mailing list)
You could use a component if you wished.  A partial is faster, if you
can use it.
This topic is locked and can not be replied to.