Class: Spree::Api::V2::Tenant::ShowEliminationSessionsController
- Inherits:
-
BaseController
- Object
- ResourceController
- BaseController
- Spree::Api::V2::Tenant::ShowEliminationSessionsController
- Defined in:
- app/controllers/spree/api/v2/tenant/show_elimination_sessions_controller.rb
Instance Method Summary collapse
-
#collection ⇒ Object
override.
-
#collection_serializer ⇒ Object
override.
Methods inherited from BaseController
#current_vendor, #render_serialized_payload, #require_tenant
Instance Method Details
#collection ⇒ Object
override
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/spree/api/v2/tenant/show_elimination_sessions_controller.rb', line 7 def collection @collection ||= scope .includes( :episode, :show, eliminated_voting_contestants: [ :show_contestant, { show_contestant: %i[show_contestant_images show_contestant_videos] } ] ) .order('cm_voting_sessions.closes_at DESC') end |
#collection_serializer ⇒ Object
override
21 22 23 |
# File 'app/controllers/spree/api/v2/tenant/show_elimination_sessions_controller.rb', line 21 def collection_serializer Spree::V2::Tenant::VotingSessionSerializer end |