Sha256: eb802c12a7df685db2a36a34dcb85024e9fdc37d33f0300119478311cd075a74

Contents?: true

Size: 312 Bytes

Versions: 5

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

module SolidusAdmin
  class CountriesController < SolidusAdmin::BaseController
    skip_before_action :authorize_solidus_admin_user!

    def states
      @states = Spree::State.where(country_id: params[:country_id])
      render json: @states.select(:id, :name)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_admin-0.3.2 app/controllers/solidus_admin/countries_controller.rb
solidus_admin-0.3.1 app/controllers/solidus_admin/countries_controller.rb
solidus_admin-0.3.0 app/controllers/solidus_admin/countries_controller.rb
solidus_admin-0.2.0 app/controllers/solidus_admin/countries_controller.rb
solidus_admin-0.1.0 app/controllers/solidus_admin/countries_controller.rb