Class: Spree::Api::V1::CreditCardsController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/api/v1/credit_cards_controller.rb

Instance Attribute Summary

Attributes inherited from BaseController

#current_api_user

Instance Method Summary collapse

Methods inherited from BaseController

#content_type, #permitted_line_item_attributes

Methods included from ControllerSetup

included

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
# File 'app/controllers/spree/api/v1/credit_cards_controller.rb', line 7

def index
  @credit_cards = user.
                  credit_cards.
                  accessible_by(current_ability, :read).
                  with_payment_profile.
                  ransack(params[:q]).result.page(params[:page]).per(params[:per_page])
  respond_with(@credit_cards)
end