summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-02-13 00:10:09 -0800
committerelijah <elijah@riseup.net>2013-02-13 00:10:09 -0800
commit1ffbf21a961b93a33ea94b578a4260932f13414d (patch)
tree494ad8e0a4fe2c19bea7eb3e4dbcee47eb37d0ba /app
parentea5f89e55c7afde4bf2d6719b0afa8a878082fb5 (diff)
switch order of respond_to for page controller, in case client has sent '*/*' for content type.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/pages_controller.rb4
-rw-r--r--app/views/errors/error.atom1
2 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/pages_controller.rb b/app/controllers/pages_controller.rb
index 36c733b..acf525c 100644
--- a/app/controllers/pages_controller.rb
+++ b/app/controllers/pages_controller.rb
@@ -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
index 0000000..760589c
--- /dev/null
+++ b/app/views/errors/error.atom
@@ -0,0 +1 @@
+error \ No newline at end of file