<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: assigns code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sat, 11 Oct 2008 17:05:24 GMT</pubDate>
    <description>DZone Snippets: assigns code</description>
    <item>
      <title>Render a partial to an instance variable</title>
      <link>http://snippets.dzone.com/posts/show/396</link>
      <description>Normally, if you call "render_partial" within a controller, nothing but the partial will be rendered.&lt;br /&gt;&lt;br /&gt;Occasionally, it is useful to render a partial to an instance variable as a string so that the view can still be rendered as normal, and the string can be passed in to the view.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  add_variables_to_assigns&lt;br /&gt;  @content_for_navbar = @template.render_partial 'layouts/public_navbar'&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 19 Jun 2005 15:27:40 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/396</guid>
      <author>canadaduane (Duane Johnson)</author>
    </item>
  </channel>
</rss>
