Sha256: 3b79aa2eac2a9457c2846a817404dba8a571e30e03af82b0c8fff5db8f33f334
Contents?: true
Size: 485 Bytes
Versions: 3
Compression:
Stored size: 485 Bytes
Contents
require 'active_record' module AdaptiveAlias module ActiveModelPatches module ApplyScope def apply_scope(scope, table, key, value) klass = table.instance_variable_get(:@klass) || table.send(:type_caster).send(:types) key = klass.attribute_aliases[key] || key super(scope, table, key, value) end end end end class ActiveRecord::Associations::AssociationScope prepend AdaptiveAlias::ActiveModelPatches::ApplyScope end
Version data entries
3 entries across 3 versions & 1 rubygems