Class: InfractionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- InfractionsController
- Defined in:
- app/controllers/infractions_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /infractions.
-
#show ⇒ Object
GET /infractions/:id.
Instance Method Details
#index ⇒ Object
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 |
#show ⇒ Object
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 |