Created
January 8, 2012 23:37
-
-
Save postpostmodern/1580129 to your computer and use it in GitHub Desktop.
posts scoped by subdomain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ApplicationController | |
inherit_resources | |
protected | |
def begin_of_association_chain | |
Agency.find_by_code request.subdomains.first | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment