Displaying 1 result from an estimated 1 matches for "personalizeddomain".
2011 Apr 21
1
Rails 3 Foreign Domain routing - cannot get this to work!
...w/out plugins in rails3. I''ve searched countless websites
on the subject and I''m attempting to build an app based on this example:
http://glacialis.postmodo.com/
so, as in this example, I''ve created lib/personalized_domain.rb
[code]
# lib/personalized_domain.rb
class PersonalizedDomain
def self.matches?(request)
case request.host
when ''www.#{APP_CONFIG[:domain]}'', ''#{APP_CONFIG[:domain]}'', nil
false
else
true
end
end
end
[/code]
and in my routes I have this:
[code]
# config/routes
constraints(PersonalizedDomai...