Module: DryCrudJsonapi::Prepends

Defined in:
lib/dry_crud_jsonapi.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



12
13
14
15
16
17
# File 'lib/dry_crud_jsonapi.rb', line 12

def index
  respond_to do |format|
    format.jsonapi { jsonapi_render(entries) }
    format.all { super }
  end
end

#showObject



19
20
21
22
23
24
# File 'lib/dry_crud_jsonapi.rb', line 19

def show
  respond_to do |format|
    format.jsonapi { jsonapi_render(entry) }
    format.all { super }
  end
end