I have this in my view but I would like to clean it up and put it all inside a method in a helper.
I know how to put div and some content inside a content_tag. However how do I pass the partial?
<% if show_content?(flash[:invitation]) %>
<div id="invite_box">
<%= render :partial => 'user/invite', :locals => {:user => @user } %>
</div>
<% elsif show_content?(flash[:confirmation]) %>
<%= render :partial => 'user/invite_confirmation' %>
<% end %>
If the
invitepartial should always be wrapped in aninvite_boxdiv, it would make sense to just put that div inside the partial.However, you can do this in your helper:
Then in your view just do: