From 6486936a1b46a5f48639e282d9b9907b679270fe Mon Sep 17 00:00:00 2001 From: Mike Date: Mon, 23 Oct 2023 17:39:41 +0000 Subject: [PATCH] rename for clarity --- lib/mongoid/slug.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/mongoid/slug.rb b/lib/mongoid/slug.rb index 4777280..70c5c21 100644 --- a/lib/mongoid/slug.rb +++ b/lib/mongoid/slug.rb @@ -91,7 +91,7 @@ def slug(*fields, &block) # Set indexes if slug_index && !embedded? - Mongoid::Slug::IndexBuilder.build_indexes(self, slug_scope_key, slug_by_model_type, options[:localize]) + Mongoid::Slug::IndexBuilder.build_indexes(self, slug_scope_keys, slug_by_model_type, options[:localize]) end self.slug_url_builder = block_given? ? block : default_slug_url_builder @@ -119,10 +119,10 @@ def slug_scopes slug_scope ? Array(slug_scope) : [nil] end - # Returns the scope key for indexing, considering associations + # Returns the scope keys for indexing, considering associations # # @return [ Array, Document ] - def slug_scope_key + def slug_scope_keys return nil unless slug_scope # If slug_scope is an array, we map over its elements to get each individual scope's key.