Class: DaylightDocumentation::DocumentationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- DaylightDocumentation::DocumentationController
- Defined in:
- app/controllers/daylight_documentation/documentation_controller.rb
Overview
Controller that handles rendering the API Documentation
Instance Method Summary collapse
-
#index ⇒ Object
Index of all the models/endpoints.
-
#model ⇒ Object
Model description.
Instance Method Details
#index ⇒ Object
Index of all the models/endpoints
10 11 12 |
# File 'app/controllers/daylight_documentation/documentation_controller.rb', line 10 def index @models = models end |
#model ⇒ Object
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 |