Class: Addresses::CountriesController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



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

def index
  @countries = Country.all
  render json: @countries
end

#showObject



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

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