Class: V1::EventsController

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

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_user

Instance Method Summary collapse

Methods inherited from ApplicationController

#fake_user

Instance Method Details

#indexObject


5
6
7
8
9
# File 'app/controllers/v1/events_controller.rb', line 5

def index
  policy = EventsPolicy.new(current_user, Event.package(params[:bag_id]))
  policy.authorize! :index?
  @events = policy.resolve
end