switch order of respond_to for page controller, in case client has sent '*/*' for...
authorelijah <elijah@riseup.net>
Wed, 13 Feb 2013 08:10:09 +0000 (00:10 -0800)
committerelijah <elijah@riseup.net>
Wed, 13 Feb 2013 08:10:09 +0000 (00:10 -0800)
app/controllers/pages_controller.rb
app/views/errors/error.atom [new file with mode: 0644]

index 36c733b..acf525c 100644 (file)
@@ -10,8 +10,8 @@ class PagesController < ApplicationController
     @page = site.find_pages(params[:page])
     if @page
       respond_to do |format|
+        format.html { render_page(@page) }
         format.atom { render_atom_feed(@page) }
-        format.all { render_page(@page) }
       end
     else
       raise PageNotFound.new
@@ -30,7 +30,7 @@ class PagesController < ApplicationController
 
   def render_atom_feed(root)
     if root
-      @pages = root.all_children.order_by(:posted_at, :direction => :desc).limit(PAGINATION_SIZE)
+      @pages = root.all_children.order_by(:posted_at, :direction => :desc).limit(site.pagination_size)
       if @pages.any?
         render :file => 'layouts/blog/feed', :layout => false, :content_type => 'application/atom+xml'
       else
diff --git a/app/views/errors/error.atom b/app/views/errors/error.atom
new file mode 100644 (file)
index 0000000..760589c
--- /dev/null
@@ -0,0 +1 @@
+error
\ No newline at end of file