Skip to content
Browse files

Tiny simplification.

  • Loading branch information...
1 parent c92a1e1 commit 5b1525d685542f2ab67558ead033d5375b9c6f0c @jasiek committed Jan 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/user_extension.rb
View
2 lib/user_extension.rb
@@ -4,6 +4,6 @@ def self.included(base)
end
def can?(action, page)
- UserPagePermission.count(:conditions => ['user_id = ? AND page_id = ? AND action = ?', self.id, page.id, action.to_s]) > 0
+ permissions.count(:conditions => ['page_id = ? AND action = ?', page.id, action.to_s]) > 0
end
end

0 comments on commit 5b1525d

Please sign in to comment.
Something went wrong with that request. Please try again.