Class: Inferno::Web::Controllers::Requirements::Show

Inherits:
Controller
  • Object
show all
Defined in:
lib/inferno/apps/web/controllers/requirements/show.rb

Instance Method Summary collapse

Methods inherited from Controller

call, resource_class, resource_name

Instance Method Details

#handle(req, res) ⇒ Object



8
9
10
11
12
13
# File 'lib/inferno/apps/web/controllers/requirements/show.rb', line 8

def handle(req, res)
  requirement = repo.find(req.params[:id])
  halt 404 if requirement.nil?

  res.body = serialize(requirement)
end