commit rubygem-globalid for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-globalid for openSUSE:Factory checked in at 2019-01-21 10:53:17 Comparing /work/SRC/openSUSE:Factory/rubygem-globalid (Old) and /work/SRC/openSUSE:Factory/.rubygem-globalid.new.28833 (New) Package is "rubygem-globalid" Mon Jan 21 10:53:17 2019 rev:7 rq:665962 version:0.4.2 Changes: --- /work/SRC/openSUSE:Factory/rubygem-globalid/rubygem-globalid.changes 2017-11-01 11:09:39.885715294 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-globalid.new.28833/rubygem-globalid.changes 2019-01-21 10:53:33.387786420 +0100 @@ -1,0 +2,9 @@ +Mon Jan 14 08:04:04 UTC 2019 - mschnit...@suse.com + +- updated to version 0.4.2 + + * Allow configuration in initialisers 3c8f909 + * Clear to_global_id memoization on dup #109 + * Adds hash equality #108 + +--- Old: globalid-0.4.1.gem New: globalid-0.4.2.gem Other differences: -- ++ rubygem-globalid.spec ++ --- /var/tmp/diff_new_pack.3Hh4Lw/_old 2019-01-21 10:53:33.975785710 +0100 +++ /var/tmp/diff_new_pack.3Hh4Lw/_new 2019-01-21 10:53:33.975785710 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-globalid # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-globalid -Version:0.4.1 +Version:0.4.2 Release:0 %define mod_name globalid %define mod_full_name %{mod_name}-%{version} ++ globalid-0.4.1.gem -> globalid-0.4.2.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2017-10-24 18:00:45.0 +0200 +++ new/README.md 2019-01-11 14:58:27.0 +0100 @@ -24,17 +24,17 @@ Support is automatically included in Active Record. ```ruby ->> person_gid = Person.find(1).to_global_id -=> # #> person_gid.uri -=> # #> person_gid.to_s -=> "gid://app/Person/1" +person_gid.to_s +# => "gid://app/Person/1" ->> GlobalID::Locator.locate person_gid -=> # +GlobalID::Locator.locate person_gid +# => # ``` ### Signed Global IDs @@ -42,77 +42,95 @@ For added security GlobalIDs can also be signed to ensure that the data hasn't been tampered with. ```ruby ->> person_sgid = Person.find(1).to_signed_global_id -=> # +person_sgid = Person.find(1).to_signed_global_id +# => # ->> person_sgid = Person.find(1).to_sgid -=> # +person_sgid = Person.find(1).to_sgid +# => # ->> person_sgid.to_s -=> "BAhJIh5naWQ6Ly9pZGluYWlkaS9Vc2VyLzM5NTk5BjoGRVQ=--81d7358dd5ee2ca33189bb404592df5e8d11420e" - ->> GlobalID::Locator.locate_signed person_sgid -=> # +person_sgid.to_s +# => "BAhJIh5naWQ6Ly9pZGluYWlkaS9Vc2VyLzM5NTk5BjoGRVQ=--81d7358dd5ee2ca33189bb404592df5e8d11420e" +GlobalID::Locator.locate_signed person_sgid +# => # ``` -You can even bump the security up some more by explaining what purpose a Signed Global ID is for. -In this way evildoers can't reuse a sign-up form's SGID on the login page. For example. -```ruby ->> signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') -=> #> GlobalID::Locator.locate_signed(signup_person_sgid.to_s, for: 'signup_form') -=> # -``` +**Expiration** -You can also have SGIDs that expire some time in the future. Useful if there's a resource, +Signed Global IDs can expire some time in the future. This is useful if there's a resource people shouldn't have indefinite access to, like a share link. ```ruby ->> expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') -=> # +expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') +# => # # Within 2 hours... ->> GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') -=> # +GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') +# => # # More than 2 hours later... ->> GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') -=> nil +GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') +# => nil +``` ->> explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: Time.now.advance(hours: 1)) -=> # +**In Rails, an auto-expiry of 1 month is set by default.** You can alter that deal +in an initializer with: -# 1 hour later... ->> GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s -=> nil +```ruby +# config/initializers/global_id.rb +Rails.application.config.global_id.expires_in = 3.months +``` + +You can assign a default SGID lifetime like so: + +```ruby +Sign
commit rubygem-globalid for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-globalid for openSUSE:Factory checked in at 2017-11-01 11:09:39 Comparing /work/SRC/openSUSE:Factory/rubygem-globalid (Old) and /work/SRC/openSUSE:Factory/.rubygem-globalid.new (New) Package is "rubygem-globalid" Wed Nov 1 11:09:39 2017 rev:6 rq:537508 version:0.4.1 Changes: --- /work/SRC/openSUSE:Factory/rubygem-globalid/rubygem-globalid.changes 2017-04-20 20:58:05.387385921 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-globalid.new/rubygem-globalid.changes 2017-11-01 11:09:39.885715294 +0100 @@ -1,0 +2,6 @@ +Thu Oct 26 10:02:21 UTC 2017 - co...@suse.com + +- updated to version 0.4.1 + no changelog found + +--- Old: globalid-0.4.0.gem New: globalid-0.4.1.gem Other differences: -- ++ rubygem-globalid.spec ++ --- /var/tmp/diff_new_pack.4c873L/_old 2017-11-01 11:09:40.477693671 +0100 +++ /var/tmp/diff_new_pack.4c873L/_new 2017-11-01 11:09:40.481693525 +0100 @@ -24,7 +24,7 @@ # Name: rubygem-globalid -Version:0.4.0 +Version:0.4.1 Release:0 %define mod_name globalid %define mod_full_name %{mod_name}-%{version} @@ -38,7 +38,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 Url:http://www.rubyonrails.org -Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1:gem2rpm.yml Summary:Refer to any model with a URI: gid://app/class/id License:MIT ++ globalid-0.4.0.gem -> globalid-0.4.1.gem ++ Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/railtie.rb new/lib/global_id/railtie.rb --- old/lib/global_id/railtie.rb2017-04-16 17:35:16.0 +0200 +++ new/lib/global_id/railtie.rb2017-10-24 18:00:45.0 +0200 @@ -11,6 +11,7 @@ # Set up the signed GlobalID verifier and include Active Record support. class Railtie < Rails::Railtie # :nodoc: config.global_id = ActiveSupport::OrderedOptions.new +config.eager_load_namespaces << GlobalID initializer 'global_id' do |app| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id.rb new/lib/global_id.rb --- old/lib/global_id.rb2017-04-16 17:35:16.0 +0200 +++ new/lib/global_id.rb2017-10-24 18:00:45.0 +0200 @@ -1,9 +1,19 @@ require 'global_id/global_id' +require 'active_support' autoload :SignedGlobalID, 'global_id/signed_global_id' class GlobalID - autoload :Locator, 'global_id/locator' - autoload :Identification, 'global_id/identification' - autoload :Verifier, 'global_id/verifier' + extend ActiveSupport::Autoload + + eager_autoload do +autoload :Locator +autoload :Identification +autoload :Verifier + end + + def self.eager_load! +super +require 'global_id/signed_global_id' + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata2017-04-16 17:35:16.0 +0200 +++ new/metadata2017-10-24 18:00:45.0 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: globalid version: !ruby/object:Gem::Version - version: 0.4.0 + version: 0.4.1 platform: ruby authors: - David Heinemeier Hansson autorequire: bindir: bin cert_chain: [] -date: 2017-04-16 00:00:00.0 Z +date: 2017-10-24 00:00:00.0 Z dependencies: - !ruby/object:Gem::Dependency name: activesupport @@ -75,7 +75,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.11 +rubygems_version: 2.6.12 signing_key: specification_version: 4 summary: 'Refer to any model with a URI: gid://app/class/id'
commit rubygem-globalid for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-globalid for openSUSE:Factory checked in at 2017-04-20 20:58:02 Comparing /work/SRC/openSUSE:Factory/rubygem-globalid (Old) and /work/SRC/openSUSE:Factory/.rubygem-globalid.new (New) Package is "rubygem-globalid" Thu Apr 20 20:58:02 2017 rev:5 rq:489035 version:0.4.0 Changes: --- /work/SRC/openSUSE:Factory/rubygem-globalid/rubygem-globalid.changes 2016-08-25 09:55:43.0 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-globalid.new/rubygem-globalid.changes 2017-04-20 20:58:05.387385921 +0200 @@ -1,0 +2,6 @@ +Mon Apr 17 04:32:22 UTC 2017 - co...@suse.com + +- updated to version 0.4.0 + no changelog found + +--- Old: globalid-0.3.7.gem New: globalid-0.4.0.gem Other differences: -- ++ rubygem-globalid.spec ++ --- /var/tmp/diff_new_pack.LVm6Q2/_old 2017-04-20 20:58:06.319254136 +0200 +++ /var/tmp/diff_new_pack.LVm6Q2/_new 2017-04-20 20:58:06.323253570 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-globalid # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-globalid -Version:0.3.7 +Version:0.4.0 Release:0 %define mod_name globalid %define mod_full_name %{mod_name}-%{version} ++ globalid-0.3.7.gem -> globalid-0.4.0.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2016-07-26 22:35:46.0 +0200 +++ new/README.md 2017-04-16 17:35:16.0 +0200 @@ -43,10 +43,10 @@ ```ruby >> person_sgid = Person.find(1).to_signed_global_id -=> # # >> person_sgid = Person.find(1).to_sgid -=> # # >> person_sgid.to_s => "BAhJIh5naWQ6Ly9pZGluYWlkaS9Vc2VyLzM5NTk5BjoGRVQ=--81d7358dd5ee2ca33189bb404592df5e8d11420e" @@ -66,12 +66,12 @@ => # ``` -You can also have SGIDs that expire some time in the future. This is useful if there's a resource, +You can also have SGIDs that expire some time in the future. Useful if there's a resource, people shouldn't have indefinite access to, like a share link. ```ruby >> expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: >> 'sharing') -=> # # # Within 2 hours... >> GlobalID::Locator.locate_signed(expiring_sgid.to_s, for: 'sharing') @@ -82,11 +82,37 @@ => nil >> explicit_expiring_sgid = SecretAgentMessage.find(5).to_sgid(expires_at: >> Time.now.advance(hours: 1)) -=> # # # 1 hour later... >> GlobalID::Locator.locate_signed explicit_expiring_sgid.to_s => nil + +# Passing a false value to either expiry option turns off expiration entirely. +>> never_expiring_sgid = Document.find(5).to_sgid(expires_in: nil) +=> # + +# Any time later... +>> GlobalID::Locator.locate_signed never_expiring_sgid +=> # +``` + +Note that an explicit `:expires_at` takes precedence over a relative `:expires_in`. + +You can assign a default SGID lifetime like so: + +```ruby +SignedGlobalID.expires_in = 1.month +``` + +This way any generated SGID will use that relative expiry. + +In Rails, an auto-expiry of 1 month is set by default. You can alter that deal +in an initializer with: + +```ruby +# config/initializers/global_id.rb +Rails.application.config.global_id.expires_in = 3.months ``` ### Custom App Locator Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/railtie.rb new/lib/global_id/railtie.rb --- old/lib/global_id/railtie.rb2016-07-26 22:35:46.0 +0200 +++ new/lib/global_id/railtie.rb2017-04-16 17:35:16.0 +0200 @@ -22,7 +22,7 @@ config.after_initialize do app.config.global_id.verifier ||= begin - app.message_verifier(:signed_global_ids) + GlobalID::Verifier.new(app.key_generator.generate_key('signed_global_ids')) rescue ArgumentError nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/verifier.rb new/lib/global_id/verifier.rb --- old/lib/global_id/verifier.rb 1970-01-01 01:00:00.0 +0100 +++ new/lib/global_id/verifier.rb 2017-04-16 17:35:16.0 +0200 @@ -0,0 +1,15 @@ +require 'active_support' +require 'active_support/message_verifier' + +class GlobalID + class Verifier < ActiveSupport::MessageVerifier +private
commit rubygem-globalid for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-globalid for openSUSE:Factory checked in at 2016-08-25 09:55:41 Comparing /work/SRC/openSUSE:Factory/rubygem-globalid (Old) and /work/SRC/openSUSE:Factory/.rubygem-globalid.new (New) Package is "rubygem-globalid" Changes: --- /work/SRC/openSUSE:Factory/rubygem-globalid/rubygem-globalid.changes 2015-08-05 19:14:43.0 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-globalid.new/rubygem-globalid.changes 2016-08-25 09:55:43.0 +0200 @@ -1,0 +2,6 @@ +Wed Jul 27 04:29:42 UTC 2016 - co...@suse.com + +- updated to version 0.3.7 + no changelog found + +--- Old: globalid-0.3.6.gem New: globalid-0.3.7.gem Other differences: -- ++ rubygem-globalid.spec ++ --- /var/tmp/diff_new_pack.PiuXSO/_old 2016-08-25 09:55:44.0 +0200 +++ /var/tmp/diff_new_pack.PiuXSO/_new 2016-08-25 09:55:44.0 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-globalid # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-globalid -Version:0.3.6 +Version:0.3.7 Release:0 %define mod_name globalid %define mod_full_name %{mod_name}-%{version} @@ -53,7 +53,7 @@ %install %gem_install \ - --doc-files="MIT-LICENSE" \ + --doc-files="MIT-LICENSE README.md" \ -f %gem_packages ++ globalid-0.3.6.gem -> globalid-0.3.7.gem ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/MIT-LICENSE new/MIT-LICENSE --- old/MIT-LICENSE 2015-08-04 23:30:09.0 +0200 +++ new/MIT-LICENSE 2016-07-26 22:35:46.0 +0200 @@ -1,4 +1,4 @@ -Copyright (c) 2014 David Heinemeier Hansson +Copyright (c) 2014-2016 David Heinemeier Hansson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.0 +0100 +++ new/README.md 2016-07-26 22:35:46.0 +0200 @@ -0,0 +1,130 @@ +# Global ID - Reference models by URI + +A Global ID is an app wide URI that uniquely identifies a model instance: + + gid://YourApp/Some::Model/id + +This is helpful when you need a single identifier to reference different +classes of objects. + +One example is job scheduling. We need to reference a model object rather than +serialize the object itself. We can pass a Global ID that can be used to locate +the model when it's time to perform the job. The job scheduler doesn't need to know +the details of model naming and IDs, just that it has a global identifier that +references a model. + +Another example is a drop-down list of options, consisting of both Users and Groups. +Normally we'd need to come up with our own ad hoc scheme to reference them. With Global +IDs, we have a universal identifier that works for objects of both classes. + + +## Usage + +Mix `GlobalID::Identification` into any model with a `#find(id)` class method. +Support is automatically included in Active Record. + +```ruby +>> person_gid = Person.find(1).to_global_id +=> #> person_gid.uri +=> #> person_gid.to_s +=> "gid://app/Person/1" + +>> GlobalID::Locator.locate person_gid +=> # +``` + +### Signed Global IDs + +For added security GlobalIDs can also be signed to ensure that the data hasn't been tampered with. + +```ruby +>> person_sgid = Person.find(1).to_signed_global_id +=> #> person_sgid = Person.find(1).to_sgid +=> #> person_sgid.to_s +=> "BAhJIh5naWQ6Ly9pZGluYWlkaS9Vc2VyLzM5NTk5BjoGRVQ=--81d7358dd5ee2ca33189bb404592df5e8d11420e" + +>> GlobalID::Locator.locate_signed person_sgid +=> # + +``` +You can even bump the security up some more by explaining what purpose a Signed Global ID is for. +In this way evildoers can't reuse a sign-up form's SGID on the login page. For example. + +```ruby +>> signup_person_sgid = Person.find(1).to_sgid(for: 'signup_form') +=> #> GlobalID::Locator.locate_signed(signup_person_sgid.to_s, for: 'signup_form') +=> # +``` + +You can also have SGIDs that expire some time in the future. This is useful if there's a resource, +people shouldn't have indefinite access to, like a share link. + +```ruby +>> expiring_sgid = Document.find(5).to_sgid(expires_in: 2.hours, for: 'sharing') +=> #> GlobalID::Locator.locate_signed(expiring_sgid.to_s,
commit rubygem-globalid for openSUSE:Factory
Hello community, here is the log from the commit of package rubygem-globalid for openSUSE:Factory checked in at 2015-08-05 19:14:37 Comparing /work/SRC/openSUSE:Factory/rubygem-globalid (Old) and /work/SRC/openSUSE:Factory/.rubygem-globalid.new (New) Package is "rubygem-globalid" Changes: --- /work/SRC/openSUSE:Factory/rubygem-globalid/rubygem-globalid.changes 2015-04-10 09:53:47.0 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-globalid.new/rubygem-globalid.changes 2015-08-05 19:14:43.0 +0200 @@ -1,0 +2,6 @@ +Wed Aug 5 04:31:13 UTC 2015 - co...@suse.com + +- updated to version 0.3.6 + no changelog found + +--- Old: globalid-0.3.5.gem New: globalid-0.3.6.gem Other differences: -- ++ rubygem-globalid.spec ++ --- /var/tmp/diff_new_pack.9LT44G/_old 2015-08-05 19:14:44.0 +0200 +++ /var/tmp/diff_new_pack.9LT44G/_new 2015-08-05 19:14:44.0 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-globalid -Version:0.3.5 +Version:0.3.6 Release:0 %define mod_name globalid %define mod_full_name %{mod_name}-%{version} ++ globalid-0.3.5.gem -> globalid-0.3.6.gem ++ Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/global_id.rb new/lib/global_id/global_id.rb --- old/lib/global_id/global_id.rb 1970-01-01 01:00:00.0 +0100 +++ new/lib/global_id/global_id.rb 2015-08-04 23:30:09.0 +0200 @@ -11,7 +11,8 @@ def create(model, options = {}) if app = options.fetch(:app) { GlobalID.app } -new URI::GID.create(app, model), options +params = options.except(:app, :verifier, :for) +new URI::GID.create(app, model, params), options else raise ArgumentError, 'An app is required to create a GlobalID. ' \ 'Pass the :app option or set the default GlobalID.app.' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/identification.rb new/lib/global_id/identification.rb --- old/lib/global_id/identification.rb 1970-01-01 01:00:00.0 +0100 +++ new/lib/global_id/identification.rb 2015-08-04 23:30:09.0 +0200 @@ -4,13 +4,13 @@ module Identification extend ActiveSupport::Concern -def to_global_id - @global_id ||= GlobalID.create(self) +def to_global_id(options = {}) + @global_id ||= GlobalID.create(self, options) end alias to_gid to_global_id -def to_gid_param - to_global_id.to_param +def to_gid_param(options = {}) + to_global_id(options).to_param end def to_signed_global_id(options = {}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/global_id/locator.rb new/lib/global_id/locator.rb --- old/lib/global_id/locator.rb1970-01-01 01:00:00.0 +0100 +++ new/lib/global_id/locator.rb2015-08-04 23:30:09.0 +0200 @@ -19,8 +19,11 @@ end # Takes an array of GlobalIDs or strings that can be turned into a GlobalIDs. - # The GlobalIDs are located using Model.find(array_of_ids), so the models must respond to - # that finder signature. + # All GlobalIDs must belong to the same app, as they will be located using + # the same locator using its locate_many method. + # + # By default the GlobalIDs will be located using Model.find(array_of_ids), so the + # models must respond to that finder signature. # # This approach will efficiently call only one #find (or #where(id: id), when using ignore_missing) # per model class, but still interpolate the results to match the order in which the gids were passed. @@ -37,13 +40,8 @@ # we will use #where(id: ids) instead, which does not raise on missing records. def locate_many(gids, options = {}) if (allowed_gids = parse_allowed(gids, options[:only])).any? - models_and_ids = allowed_gids.collect { |gid| [ gid.model_name.constantize, gid.model_id ] } - ids_by_model= models_and_ids.group_by(&:first) - loaded_by_model = Hash[ids_by_model.map { |model, ids| -[ model, find_records(model, ids.map(&:last), ignore_missing: options[:ignore_missing]).index_by { |record| record.id.to_s } ] - }] - - models_and_ids.collect { |(model, id)| loaded_by_model[model][id] }.compact + locator = locator_for(allowed_gids.first) + locator.locate_many(allowed_gids, options) else [] end @@ -108,7 +106,9 @@