Sha256: 476ceb668a3fe1a69d370e7378a9edbb3a407dbc4cec5466f3d6336be20f6a4c
Contents?: true
Size: 663 Bytes
Versions: 61
Compression:
Stored size: 663 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).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, :show).find(params[:id]) respond_with(@country) end end end end end
Version data entries
61 entries across 61 versions & 1 rubygems