Sha256: 45f9485d186863c207f66594313b1b8fdd7f38501b960b2513e173b12461371a

Contents?: true

Size: 438 Bytes

Versions: 7

Compression:

Stored size: 438 Bytes

Contents

module Effective
  class AddressesController < ApplicationController
    skip_authorization_check if defined?(CanCan)
    respond_to :json

    def subregions
      @subregions = Carmen::Country.coded(params[:country_code]).try(:subregions)

      if @subregions.present?
        render :partial => 'effective/addresses/subregions'
      else
        render :text => "<option value=''>None Available</option>"
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
effective_addresses-1.0.6 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.5 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.4 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.3 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.2 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.1 app/controllers/effective/addresses_controller.rb
effective_addresses-1.0.0 app/controllers/effective/addresses_controller.rb