Class: CitiesController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/cities_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
# File 'app/controllers/cities_controller.rb', line 5

def index
  @state = State.find(params[:state_id])
  @cities = City.where(state_id: @state).all
  respond_with @cities
end