Permalink
Browse files

Fix: use model.primary_key instead of :id

  • Loading branch information...
1 parent 94a28ed commit 19b3c190267ea5558ae54380ed4e01e4b9f61106 Joel Kociolek committed Dec 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/declarative_authorization/obligation_scope.rb
@@ -256,7 +256,7 @@ def rebuild_condition_options!
else
attribute_name = model.columns_hash["#{attribute}_id"] && :"#{attribute}_id" ||
model.columns_hash[attribute.to_s] && attribute ||
- :id
+ model.primary_key
attribute_table_alias = table_alias
used_paths << path
end

0 comments on commit 19b3c19

Please sign in to comment.