Sha256: abf76c876c73d0d3e9197dc140bf596ec4ce504648017245ec3830648072cf8a
Contents?: true
Size: 547 Bytes
Versions: 4
Compression:
Stored size: 547 Bytes
Contents
#@author : Arvind Vyas module CountryStateSelect class CscsController < ApplicationController def find_states csc = CS.states(params[:country_id]) respond_to do |format| format.json { render :json => csc.to_a} end end # Sent it to state_id and country id it will return cities of that states def find_cities cities = CS.cities(params[:state_id].to_sym, params[:country_id].to_sym) respond_to do |format| format.json { render :json => cities.to_a} end end end end
Version data entries
4 entries across 4 versions & 1 rubygems