Class: Addresses::RegionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Addresses::RegionsController
- Defined in:
- app/controllers/addresses/regions_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 10 |
# File 'app/controllers/addresses/regions_controller.rb', line 7 def index @regions = Region.where(country_id: params[:country_id]) render json: @regions end |
#show ⇒ Object
12 13 14 15 |
# File 'app/controllers/addresses/regions_controller.rb', line 12 def show @region = Region.find(params[:id]) render json: @region end |