New to Rails 3? Check out the Ruby on Rails 3 Tutorial book and screencast.

A book and screencast series showing you how to develop and deploy industrial-strength Rails apps in a direct, step by step way. The screencast series includes 12 lessons over more than 15 hours! Get the best "over the shoulder" experience of following what a top Rails 3 developer does when building an app today. Click here to learn more.

SubdomainFu: Tame sub domains in your Rails apps

In Plugins

SubdomainFu is a plugin developed by Michael Bleigh of Intridea that allows you to easily deal with subdomains in your Rails applications.

Not just a superficial hack, SubdomainFu even extends the Rails routing system to allow you to specify subdomains within routes. Example:

url_for(:controller => "my_controller",
  :action => "my_action",
  :subdomain => "awesome") # =>

users_url(:subdomain => false)  # =>

# The full URL will be generated if the subdomain is not the same as the
# current subdomain, regardless of whether _path or _url is used.
users_path(:subdomain => "fun") # =>
users_path(:subdomain => false) # => /users

Post to Twitter Tweet This Post

Vaguely Related Posts (Usually)

Leave a Reply