Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix toc bug

  • Loading branch information...
commit cf614e935c2b8a3e1d804fb56ee4ef6880eac078 1 parent c7b1044
@Frost Frost authored
Showing with 1 addition and 10 deletions.
  1. +0 −9 styrdokument.rb
  2. +1 −1  views/document.erb
View
9 styrdokument.rb
@@ -4,15 +4,6 @@
class Styrdokument < Sinatra::Base
set :textile, layout_engine: :erb
- helpers do
- def toc(page)
- toc_page = page + ".toc"
- textile toc_page.to_sym, layout: false
- end
-
- def page;end
- end
-
get "/" do
erb :index, locals: {page: ""}
end
View
2  views/document.erb
@@ -1,5 +1,5 @@
<div class="pull-right toc">
- <%= toc page %>
+ <%= textile :"#{page}.toc" %>
</div>
<%= textile page.to_sym, layout: false %>
Please sign in to comment.
Something went wrong with that request. Please try again.