Include contents of one rhtml in another


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?


Turn the shared content into a partial. Google ruby rails partials and
I’m sure you’ll see a ton of demonstrations.

Charlie B.

You could use a component if you wished. A partial is faster, if you
can use it.

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs