Forum: Ruby on Rails Restful_rails with subdomains

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Danny Collier (Guest)
on 2008-12-11 22:08
(Received via mailing list)
I'm running multiple subdomains from one Rails application. I would
like to extend restful_rails so that permissions are assigned by site;
e.g. a user with administrative permission in one subdomain might have
a different permission or no permission on another subdomain.

It seems like I should alter "has_many :users, :through
=> :permissions" to also cross-check against the current site. I have
tried using :finder_sql to do this, but it does not appear to be
affecting the actual query.

Alternatively, I could rewrite "user.has_role?" and/or
"user.find_by_rolename" to include the check. But I am not having luck
with either approach. I welcome any suggestions.

This topic is locked and can not be replied to.