Forum: Ruby on Rails Restful_rails with subdomains

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
686d9df210708ca6b5602ea26c5c0916?d=identicon&s=25 Danny Collier (Guest)
on 2008-12-11 21: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.

Thanks.
This topic is locked and can not be replied to.