Class: Spree::Api::V2::Tenant::VotingContestantsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/v2/tenant/voting_contestants_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#current_vendor, #render_serialized_payload, #require_tenant

Instance Method Details

#collectionObject

override



9
10
11
12
13
14
# File 'app/controllers/spree/api/v2/tenant/voting_contestants_controller.rb', line 9

def collection
  @collection ||= @voting_session
                  .voting_contestants
                  .includes(show_contestant: :show_contestant_images)
                  .order(:id)
end

#collection_serializerObject

override



17
18
19
# File 'app/controllers/spree/api/v2/tenant/voting_contestants_controller.rb', line 17

def collection_serializer
  Spree::V2::Tenant::VotingContestantSerializer
end