Sha256: be6a200b75db72b694deaf398d92a5b6c006638d53e9fb2500da6a3966e935ed
Contents?: true
Size: 468 Bytes
Versions: 5
Compression:
Stored size: 468 Bytes
Contents
module Spree module Api class CountriesController < Spree::Api::BaseController respond_to :json def index @countries = Country.ransack(params[:q]).result. includes(:states).order('name ASC'). page(params[:page]).per(params[:per_page]) respond_with(@countries) end def show @country = Country.find(params[:id]) respond_with(@country) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems