Module: DataloaderRelationProxy::Lazy
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/dataloader_relation_proxy/lazy.rb
Overview
Including Lazy causes two changes for type classes.
1) Type.authorized? receives a relationship proxy object rather than the
actual object as its first parameter.
2) Type#rel is provided so that type instances can easily build and access
a relationship proxy.
Defined Under Namespace
Modules: Authorizer
Instance Method Summary collapse
Instance Method Details
#object ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/dataloader_relation_proxy/lazy.rb', line 31 def object if @object.is_a?(DataloaderRelationProxy) @object else DataloaderRelationProxy.for(@object.class).new(@object, context.dataloader) end end |