Skip to content

Instantly share code, notes, and snippets.

@gotjosh
Created January 10, 2011 15:07
Show Gist options
  • Save gotjosh/772870 to your computer and use it in GitHub Desktop.
Save gotjosh/772870 to your computer and use it in GitHub Desktop.
<% (@page.children || @page.parent.children).each do |child| %>
<li><%= link_to(child.title,child.url) %> </li>
<% end %>
However @page.children returns an empty array instead of nil so this doesn't work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment