Skip to content

Instantly share code, notes, and snippets.

@bobthecow
Created October 20, 2011 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobthecow/1301839 to your computer and use it in GitHub Desktop.
Save bobthecow/1301839 to your computer and use it in GitHub Desktop.
#pdf.erb
<% chapters.each do |chapter| %>
<%= chapter.compiled_content, :snapshot => :pre %>
<% end %>
#default.rb
def chapters
@items.select { |i| i.identifier =~ %r{^/chapters/} }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment