Class: InfractionsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/infractions_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

GET /infractions



5
6
7
8
# File 'app/controllers/infractions_controller.rb', line 5

def index
  @infractions = @scope.legitimate.order("infractions.reported_at DESC")
  @infraction_markers = @infractions.pluck(:lat, :lon, :id)
end

#showObject

GET /infractions/:id



11
12
13
# File 'app/controllers/infractions_controller.rb', line 11

def show
  @infraction = Infraction.includes(:user).find_by(tweet_id: params[:id])
end