I\'m trying to re-use an html component that i\'ve written that provides panel styling. Something like:
-
You can use the capture helper, and even inline in the render call :
<%= render 'my_partial',
:locals => { :title => "Some Title" },
:captured => capture { %>
Here is some content to be rendered inside the partial
<% } %>
and in shared/panel:
<%= title %>
<%= captured %>
which will produce:
Some Title
Here is some content to be rendered inside the partial
See http://api.rubyonrails.org/classes/ActionView/Helpers/CaptureHelper.html