Rename @edits variable to @changesets, for clarity
This commit is contained in:
parent
5b4636d521
commit
0dbb33016f
3 changed files with 7 additions and 7 deletions
|
@ -60,7 +60,7 @@ class ChangesetsController < ApplicationController
|
|||
|
||||
changesets = changesets.where("changesets.id <= ?", @params[:max_id]) if @params[:max_id]
|
||||
|
||||
@edits = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
|
||||
@changesets = changesets.order("changesets.id DESC").limit(20).preload(:user, :changeset_tags, :comments)
|
||||
|
||||
render :action => :index, :layout => false
|
||||
end
|
||||
|
|
|
@ -4,7 +4,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
"xmlns:georss" => "http://www.georss.org/georss") do |feed|
|
||||
feed.title changeset_index_title(params, current_user)
|
||||
|
||||
feed.updated @edits.map { |e| [e.created_at, e.closed_at].max }.max
|
||||
feed.updated @changesets.map { |e| [e.created_at, e.closed_at].max }.max
|
||||
feed.icon image_url("favicon.ico")
|
||||
feed.logo image_url("mag_map-rss2.0.png")
|
||||
|
||||
|
@ -14,7 +14,7 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
|
|||
end
|
||||
end
|
||||
|
||||
@edits.each do |changeset|
|
||||
@changesets.each do |changeset|
|
||||
feed.entry(changeset, :updated => changeset.closed_at, :id => changeset_url(changeset.id, :only_path => false)) do |entry|
|
||||
entry.link :rel => "alternate",
|
||||
:href => changeset_show_url(changeset, :only_path => false),
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<% if @edits.present? %>
|
||||
<% if @changesets.present? %>
|
||||
<ol class="changesets">
|
||||
<%= render :partial => "changeset", :collection => @edits %>
|
||||
<%= render @changesets %>
|
||||
</ol>
|
||||
<% if @edits.size == 20 -%>
|
||||
<% if @changesets.size == 20 -%>
|
||||
<div class="changeset_more">
|
||||
<%= link_to t(".load_more"), url_for(@params.merge(:max_id => @edits.last.id - 1)), :class => "button load_more" %>
|
||||
<%= link_to t(".load_more"), url_for(@params.merge(:max_id => @changesets.last.id - 1)), :class => "button load_more" %>
|
||||
<div class="loader"><%= image_tag "searching.gif" %></div>
|
||||
</div>
|
||||
<% end -%>
|
||||
|
|
Loading…
Add table
Reference in a new issue