Created
July 31, 2009 14:28
-
-
Save ryanhanks/159244 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is an example of how I use it in my a view (new.html.erb): | |
<% content_navigation %> | |
<%= render :partial => 'form' %> | |
========== | |
This is my application helper: | |
module ApplicationHelper | |
def content_navigation | |
content_for :content_navigation do | |
render :partial => 'navigation' | |
end | |
end | |
end | |
=============== | |
Then I have a partial in my views/products folder called _navigation.html.erb that has the following: | |
<%= link_to "Products", products_path %> | |
I plan to put a set of navigation links in this partial, but I was just working on proof of concept at the moment. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment