Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Adding better subdomain support to rails
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
README.markdown
Rakefile
subrails.gemspec

README.markdown

Subrails

Adding better subdomain support to raisl

Routing

Methods:

subdomain

# An alias for constraints :subdomain => 'www' do…
subdomain :www do
  …
end

# An alias for constraints :subdomain => /things|stuff|radsauce/ do…
subdomain :things, :stuff, :radsauce do
  …
end

redirect_to_subdomain

match 'posts(/:id)' => redirect_to_subdomain(:www, 'blog/posts/%{id}')
Something went wrong with that request. Please try again.