diff options
| author | morilla <mo@mokhan.ca> | 2011-05-03 18:56:01 -0600 |
|---|---|---|
| committer | morilla <mo@mokhan.ca> | 2011-05-03 18:56:01 -0600 |
| commit | bc6d839cc495bc0cd7f3cca0b31ec0e48dde18be (patch) | |
| tree | 85130b2d0da1bbe44aa72162620f29e42ece763b /app/controllers/home_controller.rb | |
| parent | edf0bcca3d0b655c7eac6c5429bbe8fd837c8686 (diff) | |
display the 5 most recent creations.
Diffstat (limited to 'app/controllers/home_controller.rb')
| -rw-r--r-- | app/controllers/home_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 95f29929..46746aa3 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,4 +1,10 @@ class HomeController < ApplicationController def index + @creations = Creation.all.take(5).reverse + + respond_to do |format| + format.html # index.html.erb + format.xml { render :xml => @creations } + end end end |
