code_junkie

One Rails application, several domain names

Nov 11th, 2011
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. layout :setup_layout
  2. def setup_layout
  3. if request.host == "site1.host.tld"
  4. "layout1"
  5. else
  6. "layout2"
  7. end
  8. end
  9.  
  10. server_name site1.host.tld site2.host.tld
Add Comment
Please, Sign In to add comment