Skip to content

Commit

Permalink
Tiny simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasiek committed Jan 10, 2011
1 parent c92a1e1 commit 5b1525d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/user_extension.rb
Expand Up @@ -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.