Sha256: ebff12c2842fa7d3d62a6de1bc9135b70f414e9202f28dc7fb66b77846daebf0

Contents?: true

Size: 299 Bytes

Versions: 9

Compression:

Stored size: 299 Bytes

Contents

require_dependency "addresses/application_controller"

module Addresses
  class NeighborhoodsController < ApplicationController
    def index
      @city = City.find(params[:city_id])

      @neighborhoods = @city.neighborhoods.order("name asc")

      render json: @neighborhoods
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
addresses-1.0.11 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.9 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.8 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.7 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.6 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.5 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.4 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.3 app/controllers/addresses/neighborhoods_controller.rb
addresses-1.0.2 app/controllers/addresses/neighborhoods_controller.rb