What is the difference? I ask because I'm just starting RoR dev, and I need to modify an application to add a new div to a page. I want to be able to render this div independently, and currently the rhtml code is part of the view of the page that will be rendered. I assume I would need to move this into a partial layout from what I have gathered so far.
What you need is a partial view not a partial layout.
http://api.rubyonrails.org/classes/ActionView/PartialRenderer.html
The layout is a template that contains shared DOM components, the View is what fills this template.
http://guides.rubyonrails.org/layouts_and_rendering.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With