]> git.openstreetmap.org Git - rails.git/blob - app/controllers/traces/feeds_controller.rb
Add frozen_string_literal comments to ruby files
[rails.git] / app / controllers / traces / feeds_controller.rb
1 # frozen_string_literal: true
2
3 module Traces
4   class FeedsController < ApplicationController
5     before_action :authorize_web
6     before_action :set_locale
7     before_action :check_database_readable
8
9     authorize_resource :class => Trace
10
11     def show
12       @traces = Trace.visible_to_all.visible
13
14       @traces = @traces.joins(:user).where(:users => { :display_name => params[:display_name] }) if params[:display_name]
15
16       @traces = @traces.tagged(params[:tag]) if params[:tag]
17       @traces = @traces.order(:timestamp => :desc)
18       @traces = @traces.limit(20)
19       @traces = @traces.includes(:user)
20     end
21   end
22 end