Sha256: 3e9d4bf5a926e21572936afc2ac5d3bad94ee08e3dc812fe57055e84230da999
Contents?: true
Size: 555 Bytes
Versions: 20
Compression:
Stored size: 555 Bytes
Contents
# frozen_string_literal: true require 'activemodel/associations' module EacRailsUtils module Patches module Rails4 module ActiveRecordAssociationsAssociationScope def add_constraints(scope, owner, association_klass, *extra_args) if extra_args.any? refl = extra_args.first if refl.options[:active_model] target_ids = refl.options[:target_ids] return scope.where(id: owner[target_ids]) end end super end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems