Sha256: b5f795062459223410a20c67ddb06df14b4f832cb7a3f9db28d8afc185a1bc98

Contents?: true

Size: 318 Bytes

Versions: 3

Compression:

Stored size: 318 Bytes

Contents

class TbCommerce::Api::StatesController < TbCommerce::Api::BaseController

  def index
    country = Country[params.require(:country)]
    if country.blank?
      raise Spud::NotFoundError.new(:item => 'country')
    end
    @states = country.states
    expires_in 1.day, :public => true
    render 'index'
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tb_commerce-0.0.4 app/controllers/tb_commerce/api/states_controller.rb
tb_commerce-0.0.3 app/controllers/tb_commerce/api/states_controller.rb
tb_commerce-0.0.2 app/controllers/tb_commerce/api/states_controller.rb