module Railsful::Serializable
Public Instance Methods
fast_jsonapi_options(options)
click to toggle source
# File lib/railsful/serializable.rb, line 19 def fast_jsonapi_options(options) Serializer.new(self).render(options) end
render(options = nil, extra_options = {}, &block)
click to toggle source
Calls superclass method
# File lib/railsful/serializable.rb, line 5 def render(options = nil, extra_options = {}, &block) # In case we see regular page-render requests like: # # render :index, layout: true # # we just pass them through without modification to Rails. if options.is_a?(Symbol) || extra_options.key?(:layout) return super(*[options, extra_options], &block) end super(fast_jsonapi_options(options), extra_options, &block) end