Class: Pragma::Operation::Show

Inherits:
Base
  • Object
show all
Includes:
Defaults
Defined in:
lib/pragma/operation/show.rb

Overview

Finds the requested record, authorizes it and decorates it.

Author:

  • Alessandro Desantis

Instance Method Summary collapse

Methods included from Defaults

included

Instance Method Details

#callObject



10
11
12
13
14
15
# File 'lib/pragma/operation/show.rb', line 10

def call
  context.record = find_record
  authorize! context.record

  respond_with resource: decorate(context.record), status: :ok
end