Class: JsonRoutes::ApplicationController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
# File 'app/controllers/json_routes/application_controller.rb', line 3

def index
  routes_file = File.open('apify_resources.json')
  routes = JSON["#{routes_file.read}"]
  routes_file.close

  render :json => routes
end

#infoObject



11
12
13
# File 'app/controllers/json_routes/application_controller.rb', line 11

def info
  render :json => { version: File.mtime('apify_resources.json') }
end