views:

23

answers:

1

I have a div id called common, the content that I would like to appear in this div is in the file share/_common.html.erb

What should I put in place of <!-- content from _common.html.erb --> so that the contents of share/_common.html.erb appears in the div?

<div id="common">
<!-- content from _common.html.erb -->
</div>
+3  A: 

Replace your HTML comment with this:

<%= render :partial => "share/common" %>

or, if you're on Rails 2.3.x:

<%= render "share/common" %>
Alex Reisner