Is there a way to point top-level domains to individual records in a rails app - similar to subdomains. kinda like http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/
Asked
Active
Viewed 106 times
1 Answers
0
You want to look at constraints and the request object
:
http://edgeguides.rubyonrails.org/action_controller_overview.html#the-request-object
match '/' => {:controller => "mycontroller", :action => "show", :id => "1"},
:constraints => { :domain => "mydomain.com" }
(Remove the line-break if this doesn't work)

Tigraine
- 23,358
- 11
- 65
- 110