Sha256: 257edca1fca7be66bda952528fef0c490a1c8380163aabacdf8a9b1f6238b431
Contents?: true
Size: 670 Bytes
Versions: 39
Compression:
Stored size: 670 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 respond_with(@countries) if stale?(country) end def show @country = Country.accessible_by(current_ability, :read).find(params[:id]) respond_with(@country) end end end end end
Version data entries
39 entries across 39 versions & 1 rubygems