Skip to content

Commit 19b3c19

Browse files
author
Joel Kociolek
committed
Fix: use model.primary_key instead of :id
1 parent 94a28ed commit 19b3c19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/declarative_authorization/obligation_scope.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def rebuild_condition_options!
256256
else
257257
attribute_name = model.columns_hash["#{attribute}_id"] && :"#{attribute}_id" ||
258258
model.columns_hash[attribute.to_s] && attribute ||
259-
:id
259+
model.primary_key
260260
attribute_table_alias = table_alias
261261
used_paths << path
262262
end

0 commit comments

Comments
 (0)