Class: T2Airtime::CountriesController

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

Overview

Proxy countries information

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
10
11
12
# File 'app/controllers/t2_airtime/countries_controller.rb', line 4

def index
  @countries = T2Airtime::Country.all
  if @countries.success?
    render_data T2Airtime::Country.serialize @countries.data,
                                             @countries.headers[:date]
  else
    render_error @countries
  end
end

#showObject

noop



15
16
17
# File 'app/controllers/t2_airtime/countries_controller.rb', line 15

def show
  render_one 'countries'
end