Sha256: 7923e45c54e9d3f8fe31601fdf931b099810026db322ec7f6a9818e694261924
Contents?: true
Size: 541 Bytes
Versions: 7
Compression:
Stored size: 541 Bytes
Contents
module Spree module Api class CountriesController < Spree::Api::BaseController skip_before_filter :check_for_user_or_api_key skip_before_filter :authenticate_user 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
7 entries across 7 versions & 1 rubygems