Skip to content

Instantly share code, notes, and snippets.

@kibaekr
Created November 22, 2012 10:56
Show Gist options
  • Save kibaekr/4130553 to your computer and use it in GitHub Desktop.
Save kibaekr/4130553 to your computer and use it in GitHub Desktop.
yields and routes?
<body>
<%= render 'layouts/header' %>
<div class="background">
<% if current_page?(root_url) %>
<%= yield :index %>
<!-- PROBLEM: if i include the show_track, then other pages dont work -->
<% elsif current_page?(@track) %>
<%= yield :show_track %>
<% else %>
<div class="container_980 white shadow-horizontal">
<div class="container">
<%= render 'layouts/flashes' %>
<%= yield %>
</div>
</div>
<% end %>
</div> <!-- end body class -->
<% content_for :show_track do %>
blah blah blah
<% do %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment