Class: Cerberus::Annotations::AnnotationsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/cerberus/annotations/annotations_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
10
# File 'app/controllers/cerberus/annotations/annotations_controller.rb', line 4

def index
  @annotations = Dir.glob(File.join(fixtures_path, '*')).map { |x| x.split("/").last.gsub('.json', '') }
  
  respond_to do |format|
    format.html
  end
end

#showObject



12
13
14
15
16
17
18
19
# File 'app/controllers/cerberus/annotations/annotations_controller.rb', line 12

def show
  load_annotation
  
  respond_to do |format|
    format.html
    format.json
  end
end