500 error when loading rss atom with "offset" parameter
Created by: dodocat
I am trying to load the rss atom with pagination. But it seems the atom feed dose not support the atom standard previou
next
keyword.
And then I find the offset parameter in dashboard text/html
type request, tryed it and get 500 error.
Here is the log.
Started GET "/dashboard.atom?private_token=xxx&page=23&limit=20&offset=60" for 127.0.0.1 at 2014-09-04 09:08:10 +0800
Processing by DashboardController#show as ATOM
Parameters: {"private_token"=>"xxx", "page"=>"23", "limit"=>"20", "offset"=>"60"}
Completed 500 Internal Server Error in 25ms
ActionView::Template::Error (undefined method `strftime' for nil:NilClass):
4: xml.link :href => dashboard_url(:atom), :rel => "self", :type => "application/atom+xml"
5: xml.link :href => dashboard_url, :rel => "alternate", :type => "text/html"
6: xml.id projects_url
7: xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
8:
9: @events.each do |event|
10: if event.proper?
app/views/dashboard/show.atom.builder:7:in `block in _app_views_dashboard_show_atom_builder___3514616857617173375_69882486551900'
app/views/dashboard/show.atom.builder:2:in `_app_views_dashboard_show_atom_builder___3514616857617173375_69882486551900'
app/controllers/dashboard_controller.rb:30:in `block (2 levels) in show'
app/controllers/dashboard_controller.rb:27:in `show'
Started GET "/dashboard.atom?private_token=xxx&offset=60" for 127.0.0.1 at 2014-09-04 09:08:20 +0800
Processing by DashboardController#show as ATOM
Parameters: {"private_token"=>"xxx", "offset"=>"60"}
Completed 500 Internal Server Error in 23ms
ActionView::Template::Error (undefined method `strftime' for nil:NilClass):
4: xml.link :href => dashboard_url(:atom), :rel => "self", :type => "application/atom+xml"
5: xml.link :href => dashboard_url, :rel => "alternate", :type => "text/html"
6: xml.id projects_url
7: xml.updated @events.maximum(:updated_at).strftime("%Y-%m-%dT%H:%M:%SZ") if @events.any?
8:
9: @events.each do |event|
10: if event.proper?
app/views/dashboard/show.atom.builder:7:in `block in _app_views_dashboard_show_atom_builder___3514616857617173375_69882493973040'
app/views/dashboard/show.atom.builder:2:in `_app_views_dashboard_show_atom_builder___3514616857617173375_69882493973040'
app/controllers/dashboard_controller.rb:30:in `block (2 levels) in show'
app/controllers/dashboard_controller.rb:27:in `show'
Started GET "/team/readboy-common.git/info/refs?service=git-upload-pack" for 127.0.0.1 at 2014-09-04 09:08:27 +0800
Started GET "/dashboard?private_token=xxx&page=23&limit=20&offset=0" for 127.0.0.1 at 2014-09-04 09:08:35 +0800
Processing by DashboardController#show as JSON