]> git.openstreetmap.org Git - rails.git/blob - app/controllers/old_relations_controller.rb
Add frozen_string_literal comments to ruby files
[rails.git] / app / controllers / old_relations_controller.rb
1 # frozen_string_literal: true
2
3 class OldRelationsController < OldElementsController
4   def index
5     @type = "relation"
6     @current_feature = @feature = Relation.preload(:element_tags).find(params[:id])
7     @old_features, @newer_features_version, @older_features_version = get_page_items(
8       OldRelation.where(:relation_id => params[:id]),
9       :cursor_column => :version,
10       :includes => [:old_tags, { :changeset => [:changeset_tags, :user], :old_members => :member }]
11     )
12   rescue ActiveRecord::RecordNotFound
13     render "browse/not_found", :status => :not_found
14   end
15
16   def show
17     @type = "relation"
18     @current_feature = Relation.find(params[:id])
19     @feature = OldRelation.preload(:old_tags, :changeset => [:changeset_tags, :user]).find([params[:id], params[:version]])
20   rescue ActiveRecord::RecordNotFound
21     render "browse/not_found", :status => :not_found
22   end
23 end