Class: Spree::Api::StatesController
  
  
  
  Instance Attribute Summary
  
  
  #current_api_user
  
    
      Instance Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  #map_nested_attributes_keys, #set_jsonp_format
  
  
  
  
  
  
  
  
  
  
  
  included
  
  
    Instance Method Details
    
      
  
  
    #index  ⇒ Object 
  
  
  
  
    | 
7
8
9
10
11
12
13
14
15
16 | # File 'app/controllers/spree/api/states_controller.rb', line 7
def index
  @states = scope.ransack(params[:q]).result.
              includes(:country).order('name ASC')
  if params[:page] || params[:per_page]
    @states = @states.page(params[:page]).per(params[:per_page])
  end
  respond_with(@states)
end
 | 
 
    
      
  
  
    #show  ⇒ Object 
  
  
  
  
    | 
18
19
20
21 | # File 'app/controllers/spree/api/states_controller.rb', line 18
def show
  @state = scope.find(params[:id])
  respond_with(@state)
end
 |