Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Tiny simplification.

  • Loading branch information...
commit 5b1525d685542f2ab67558ead033d5375b9c6f0c 1 parent c92a1e1
Jan Szumiec authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/user_extension.rb
2  lib/user_extension.rb
@@ -4,6 +4,6 @@ def self.included(base)
4 4 end
5 5
6 6 def can?(action, page)
7   - UserPagePermission.count(:conditions => ['user_id = ? AND page_id = ? AND action = ?', self.id, page.id, action.to_s]) > 0
  7 + permissions.count(:conditions => ['page_id = ? AND action = ?', page.id, action.to_s]) > 0
8 8 end
9 9 end

0 comments on commit 5b1525d

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