Skip to content

Commit a4d318f

Browse files
committed
Merge pull request #167 from lejoko/fix_primary_key
Fix: use model.primary_key instead of :id
2 parents ea93dc5 + 19b3c19 commit a4d318f

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)