module Draper::QueryMethods
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
Calls superclass method
# File lib/draper/query_methods.rb, line 6 def method_missing(method, *args, &block) return super unless strategy.allowed? method object.send(method, *args, &block).decorate(with: decorator_class, context: context) end
respond_to_missing?(method, include_private = false)
click to toggle source
Calls superclass method
# File lib/draper/query_methods.rb, line 12 def respond_to_missing?(method, include_private = false) strategy.allowed?(method) || super end
Private Instance Methods
strategy()
click to toggle source
Configures the strategy used to proxy the query methods, which defaults to `:active_record`.
# File lib/draper/query_methods.rb, line 19 def strategy @strategy ||= LoadStrategy.new(Draper.default_query_methods_strategy) end