Class: RequestsController

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

Instance Method Summary collapse

Instance Method Details

#showObject



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

def show
  request = Request.find(params[:id])

  respond_to do |format|
    format.html { render text: request.body }
    format.json { render json: JSON.pretty_generate(request.attributes) }
  end
end