Class: DaylightDocumentation::DocumentationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/daylight_documentation/documentation_controller.rb

Overview

Controller that handles rendering the API Documentation

Instance Method Summary collapse

Instance Method Details

#indexObject

Index of all the models/endpoints



10
11
12
# File 'app/controllers/daylight_documentation/documentation_controller.rb', line 10

def index
  @models = models
end

#modelObject

Model description



16
17
18
19
# File 'app/controllers/daylight_documentation/documentation_controller.rb', line 16

def model
  model_name = params[:model]
  @model = models.find { |model| model.name.underscore == model_name }
end