Created
November 29, 2011 22:20
-
-
Save adamdilek/1406839 to your computer and use it in GitHub Desktop.
Adress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Services::AddressController < ApplicationController | |
respond_to :html, :xml, :json | |
def index | |
end | |
def provinces | |
@provinces=Province.all | |
respond_with(@provinces) | |
end | |
def counties | |
@province=Province.find(params[:province]) | |
@[email protected] | |
respond_with([@counties]) | |
end | |
def regions | |
@county=County.find(params[:county]) | |
@[email protected] | |
respond_with(@regions) | |
end | |
def street_villages | |
@region=Region.find(params[:region]) | |
@[email protected]_villages | |
respond_with(@street_villages) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment