public
Description: A blog, powered by Sinatra (http://sinatrarb.com/). An experiment.
Clone URL: git://github.com/jw-00000/sinatra-blog.git
Add a new 'archive' template, which will be used in the new action that 
returns all entries.
jw-00000 (author)
Sun Jun 01 07:19:45 -0700 2008
commit  44af7b7f8ea3a471ba6c4935c0dbc29c60871bf3
tree    352e9e3cf73a5562ae8f474c0145f51dda7561dc
parent  5ae81e00238ec304e29fc0fca3b382dc519023ce
...
19
20
21
 
 
 
 
 
 
22
23
24
...
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -19,6 +19,12 @@
0
 # to /entries or a POST to /entries/:slug, maybe we should sent back a 405 error
0
 # with an Allow header listing the allowed methods.
0
 
0
+# Get a list of all entries, as HTML.
0
+get '/entries' do
0
+ @entries = Entry.all
0
+ haml :archive
0
+end
0
+
0
 # Get a list of all entries, as JSON.
0
 get '/entries.json' do
0
   body Entry.all.to_json

Comments

    No one has commented yet.