summaryrefslogtreecommitdiff
path: root/app/controllers/home_controller.rb
diff options
context:
space:
mode:
authormorilla <mo@mokhan.ca>2011-05-03 18:56:01 -0600
committermorilla <mo@mokhan.ca>2011-05-03 18:56:01 -0600
commitbc6d839cc495bc0cd7f3cca0b31ec0e48dde18be (patch)
tree85130b2d0da1bbe44aa72162620f29e42ece763b /app/controllers/home_controller.rb
parentedf0bcca3d0b655c7eac6c5429bbe8fd837c8686 (diff)
display the 5 most recent creations.
Diffstat (limited to 'app/controllers/home_controller.rb')
-rw-r--r--app/controllers/home_controller.rb6
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