Class: Addresses::StatesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/addresses/states_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
10
# File 'app/controllers/addresses/states_controller.rb', line 7

def index
  @states = State.where(country_id: params[:country_id])
  render json: @states
end

#showObject



12
13
14
15
# File 'app/controllers/addresses/states_controller.rb', line 12

def show
  @state = State.find(params[:id])
  render json: @state
end