Sha256: b42ad7ffa0fdcf6578ba6463e2a1d163557f43da115924d3c6394f169ab2a730
Contents?: true
Size: 696 Bytes
Versions: 46
Compression:
Stored size: 696 Bytes
Contents
module Spree module Api module V1 class CountriesController < Spree::Api::BaseController skip_before_action :authenticate_user def index @countries = Country.accessible_by(current_ability, :read).ransack(params[:q]).result. order('name ASC'). page(params[:page]).per(params[:per_page]) country = Country.order("updated_at ASC").last if stale?(country) respond_with(@countries) end end def show @country = Country.accessible_by(current_ability, :read).find(params[:id]) respond_with(@country) end end end end end
Version data entries
46 entries across 46 versions & 2 rubygems