title: rendering a partial in a flash message in Rails 3
body: <p>So I'm just trying to add some social networking share links (facebook, g+, addthis ect) to one of my flash messages when a user successfully uploads a file. I have all the code in a partial so I thought I could just render that but I just get a bunch of "/n"'s and html_safe doesnt work.</p>
  
  <p>here is my partial:</p>
  
  <pre><code> &lt;div class="share_buttons"&gt;
      &lt;div class="addthis_toolbox addthis_default_style addthis_32x32_style"&gt;
        &lt;a class="addthis_button_facebook"&gt;&lt;/a&gt;
        &lt;a class="addthis_button_twitter"&gt;&lt;/a&gt;
        &lt;a class="addthis_button_stumbleupon"&gt;&lt;/a&gt;
      &lt;/div&gt;
      &lt;script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4e8b938653ac0cd3"&gt;&lt;/script&gt;
    &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  reddit_target='tattoos'
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://www.reddit.com/static/button/button1.js"&gt;&lt;/script&gt;
  
  &lt;% content_for :jquery do %&gt;
      &lt;%= javascript_tag do %&gt;
      $(document).ready(function() {
        $(".share_buttons a").live("click", function() {
          $.ajax({
            url: '/index/share?id=&lt;%= @tattoo.id%&gt;',
            type: 'post'
          });
            return false;
        });
      });
      &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And in my controller I tried this:</p>
  
  <p><code>flash[:success] = "Thanks, feel free to share that out! #{render :partial=&gt; /shared/social_buttons</code>}"</p>