Skip to content

Commit

Permalink
Fixes static code analysis checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gurkanindibay committed Dec 2, 2023
1 parent e33732a commit b803e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/activerecord-multi-tenant/model_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def inherited(subclass)
after_initialize proc { |record|
if MultiTenant.current_tenant_id &&
(!record.attribute_present?(partition_key) || record.public_send(partition_key.to_sym).nil?)
record.public_send("#{partition_key}=".to_sym, MultiTenant.current_tenant_id)
record.public_send(:"#{partition_key}=", MultiTenant.current_tenant_id)
end
}

Expand Down

0 comments on commit b803e7c

Please sign in to comment.