Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created December 19, 2011 20:57
Show Gist options
  • Save ashaw/1498827 to your computer and use it in GitHub Desktop.
Save ashaw/1498827 to your computer and use it in GitHub Desktop.
get '/' do
@stories = Dir.glob("#{stories_root}/*").map {|q| q.gsub!(/^.*\//,"") }
erb <<-HTML
<ul>
<% @stories.each do |story| %>
<li><a href="/<%= story %>"><%= story %></a></li>
<% end %>
</ul>
HTML
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment