Module: JsonapiCompliable::Rails
- Defined in:
- lib/jsonapi_compliable/rails.rb
Overview
Rails Integration. Mix this in to ApplicationController.
-
Mixes in Base
-
Adds a global around_action (see Base#wrap_context)
-
Uses Rails'
render
for rendering
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/jsonapi_compliable/rails.rb', line 13 def self.included(klass) klass.send(:include, Base) klass.class_eval do around_action :wrap_context alias_method :perform_render_jsonapi, :render end end |