Skip to content

Commit

Permalink
Update for backward compatibility with older ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurie Nagorny committed Mar 3, 2021
1 parent fef1200 commit bfde624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongoid/multitenancy/document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def validates_tenancy_of(*args)

# Redefine 'index' to include the tenant field in first position
def index(spec, options = nil)
super_options = options.dup || {}
super_options = (options || {}).dup
full_index = super_options.delete(:full_index)
if full_index.nil? ? tenant_options[:full_indexes] : full_index
spec = { tenant_field => 1 }.merge(spec)
Expand Down

0 comments on commit bfde624

Please sign in to comment.