From 4dc5565dfce0c0e9e716bb9baff61fa4987c2274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?FABIANSKI=20C=C3=A9dric?= Date: Thu, 6 Jun 2013 10:54:24 +0300 Subject: [PATCH] Update README.rdoc --- README.rdoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rdoc b/README.rdoc index 31885590..2f9c37fe 100644 --- a/README.rdoc +++ b/README.rdoc @@ -231,7 +231,12 @@ returns all employee records that the current user is authorized to read. In addition, just like normal named scopes, query rewriting may be chained with the usual find method: - Employee.with_permissions_to(:read).find(:all, :conditions => ...) + Employee.with_permissions_to(:read).where(conditions).all + +If you need to specify a specific user who is not the current_user, you can +specify the user explicitely this way: + + Employee.with_permissions_to(:read, user: user) If the current user is completely missing the permissions, an Authorization::NotAuthorized exception is raised. Through