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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Fcf5e28e2e7ce245632a4a29896e6799?d=identicon&s=25 Scott Sherwood (Guest)
on 2006-04-19 18:11

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

I want to include the contents of login.rhtml in

any suggestions on how this can be done?

89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-04-19 18: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 Bowman
43ec5998360a0cc21b51afef1781e9c0?d=identicon&s=25 Daniel Higginbotham (Guest)
on 2006-04-19 18:54
(Received via mailing list)
I believe this can also be done by using render_component - though if
want to render a login box you'll probably want to use a partial.
89d967359903c639d31e4cad4569f537?d=identicon&s=25 Charlie Bowman (Guest)
on 2006-04-19 18: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.