From: Andy Allan Date: Wed, 26 Jun 2019 15:07:49 +0000 (+0200) Subject: Rename @edits variable to @changesets, for clarity X-Git-Tag: live~3120^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0dbb33016f77eef7d150044f06fc7ce86cde4d59 Rename @edits variable to @changesets, for clarity --- diff --git a/app/controllers/changesets_controller.rb b/app/controllers/changesets_controller.rb index 82966a353..5b6d3e010 100644 --- a/app/controllers/changesets_controller.rb +++ b/app/controllers/changesets_controller.rb @@ -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 diff --git a/app/views/changesets/index.atom.builder b/app/views/changesets/index.atom.builder index 05d9ab68a..b1fbd6992 100644 --- a/app/views/changesets/index.atom.builder +++ b/app/views/changesets/index.atom.builder @@ -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), diff --git a/app/views/changesets/index.html.erb b/app/views/changesets/index.html.erb index 1ce98301a..1e3daa081 100644 --- a/app/views/changesets/index.html.erb +++ b/app/views/changesets/index.html.erb @@ -1,10 +1,10 @@ -<% if @edits.present? %> +<% if @changesets.present? %>
    - <%= render :partial => "changeset", :collection => @edits %> + <%= render @changesets %>
-<% if @edits.size == 20 -%> +<% if @changesets.size == 20 -%>
- <%= 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" %>
<%= image_tag "searching.gif" %>
<% end -%>