Matt
unread,Feb 13, 2012, 3:41:20 PM2/13/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cantango
Hi, I'm testing out some basic access rules and trying to use a permit-
based scope in my index action. It seems like I should be able to use
something like Consumer.readable_by(current_user), but the SQL that is
called includes this bit: consumer_id` = 'read_attr_#{name}', which of
course doesn't match anything. It seems to be building the query
incorrectly, but I can't find any reference to 'read_attr_' in the
source.
In another attempt, I tried to use the accessible_by method from
CanCan to make a scope, but I'm not sure how to access that using
CanTango. I'd really appreciate some help with either of these issues.
Thanks!