end
end
-
-
##
# list edits (open changesets) in reverse chronological order
def list
@title = t 'user.no_such_user.title'
@not_found_user = params[:display_name]
render :template => 'user/no_such_user', :status => :not_found
+ return
end
end
@edits = changesets.order("changesets.created_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:user, :changeset_tags)
end
+
+ render :action => :list
+ end
+
+ ##
+ # list edits as an atom feed
+ def feed
+ list
end
private
atom_feed(:language => I18n.locale, :schema_date => 2009,
:id => url_for(params.merge({ :only_path => false })),
- :root_url => url_for(params.merge({ :only_path => false, :format => nil })),
+ :root_url => url_for(params.merge({ :action => :list, :format => nil, :only_path => false })),
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
feed.title @title
<%= render :partial => 'changeset_paging_nav' %>
-<%= atom_link_to params.merge({ :page => nil, :format => :atom }) %>
+<%= atom_link_to params.merge({ :page => nil, :action => :feed }) %>
<% content_for :head do %>
-<%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :format => :atom }) %>
+<%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %>
<% end %>
match '/browse/relation/:id/history' => 'browse#relation_history', :id => /\d+/
match '/browse/changeset/:id' => 'browse#changeset', :as => :changeset, :id => /\d+/
match '/user/:display_name/edits' => 'changeset#list'
- match '/user/:display_name/edits/feed' => 'changeset#list', :format => :atom
+ match '/user/:display_name/edits/feed' => 'changeset#feed', :format => :atom
match '/browse/changesets' => 'changeset#list'
- match '/browse/changesets/feed' => 'changeset#list', :format => :atom
+ match '/browse/changesets/feed' => 'changeset#feed', :format => :atom
match '/browse' => 'changeset#list'
# web site
match '/copyright' => 'site#copyright'
match '/copyright/:copyright_locale' => 'site#copyright'
match '/history' => 'changeset#list'
- match '/history/feed' => 'changeset#list', :format => :atom
+ match '/history/feed' => 'changeset#feed', :format => :atom
match '/export' => 'site#export'
match '/login' => 'user#login'
match '/logout' => 'user#logout'