Class: Rapporteur::StatusesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/rapporteur/statuses_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/rapporteur/statuses_controller.rb', line 7

def show
  expires_now
  respond_to do |format|
    format.json do
      resource = Rapporteur.run

      if resource.errors.empty?
        render(json: resource)
      else
        display_errors(resource, :json)
      end
    end
  end
end