Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdomain Not Using Mobile Templates #4

Open
jefffis opened this issue Apr 17, 2012 · 0 comments
Open

Subdomain Not Using Mobile Templates #4

jefffis opened this issue Apr 17, 2012 · 0 comments

Comments

@jefffis
Copy link

jefffis commented Apr 17, 2012

We noticed today on a staging site properly setup with the apache redirects, that as is, the module is not sending the correct mobile templates. We created a work around with a new initializer and adding this code in (this is specific for our domains of course):

ActionDispatch::Request.class_eval do

def subdomain(num=1)
    Rails.logger.warn "Overriding with #{num} for domain: #{domain}"
    if domain == "browsermedia.com"
        super(2)
    else
        super(num)
    end
end

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant