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