Sha256: 8c79464363662534afc653cb6b3476f34c8eb867f9281fe51f088d09d94e229d
Contents?: true
Size: 527 Bytes
Versions: 8
Compression:
Stored size: 527 Bytes
Contents
module Spree module Api module V2 class CountriesController < Spree::Api::V2::BaseController skip_before_action :authenticate_user, only: [:index, :show] def index render_collection Spree::Country.includes(:states) end def show if params[:state_id].present? render_instance Spree::State.find_country(params[:state_id]) else render_instance Spree::Country.find(params[:id]) end end end end end end
Version data entries
8 entries across 8 versions & 3 rubygems