module ParamsReady::Query::Predicate::DelegatingPredicate
Attributes
data[R]
Public Class Methods
included(base)
click to toggle source
# File lib/params_ready/query/predicate.rb, line 130 def self.included(base) base.include Parameter::DelegatingParameter end
Public Instance Methods
eligible_for_query?(_table, context)
click to toggle source
# File lib/params_ready/query/predicate.rb, line 134 def eligible_for_query?(_table, context) return false unless context.permitted? self is_definite? end
to_query_if_eligible(arel_table, context:)
click to toggle source
# File lib/params_ready/query/predicate.rb, line 140 def to_query_if_eligible(arel_table, context:) return unless eligible_for_query?(arel_table, context) context = context_for_predicates(context) to_query(arel_table, context: context) end