Class: Freegeoip::LookupsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/freegeoip/lookups_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/freegeoip/lookups_controller.rb', line 5

def index
  not_found
end

#showObject



9
10
11
12
13
14
15
# File 'app/controllers/freegeoip/lookups_controller.rb', line 9

def show
  if result = Freegeoip::Lookup.hostname_or_ip(params[:hostname_or_ip])
    render json: result
  else
    not_found
  end
end