10 Jun '12, 10pm

Subdomains in rails. This was easier than I though it would be.

Subdomains in rails. This was easier than I though it would be.

In a Rails 2 application we would have needed to use a plugin to do this, but in Rails 3 this is built in. The :subdomain option takes either a string or a regular expression and here we’ve used a regular expression that matches at least one character so any subdomain will match the route. Note that it is important that the route root comes after the subdomain route. If not, the root route will catch the subdomain routes and the subdomain route will never be called. As a general rule of thumb the more specific a route is the higher up in the list it should be.

Full article: http://railscasts.com/episodes/221-subdomains-in-rails-3?...

Tweets

Top Ruby Article: What's New in Edge Rails #24:

afreshcup.com 11 Jun '12, 11am

Monday, June 11, 2012 at 6:10AM Week of June 4 -June 10, 2012 Not a very busy week. The work merged at b4fb80cb starts red...

We're finally getting destroy! in Rails 4

pivotallabs.com 08 Jun '12, 10pm

Unlike create! , save! , and friends, the destroy! method didn't exist in Rails 3. It took me a while to get used to destr...

cleditor-rails (0.0.4): CLEeditor for rails

rubygems.org 08 Jun '12, 1pm

cleditor-rails 0.0.4 CLEeditor for rails install gem install cleditor-rails Download Documentation Subscribe Stats Authors...

Ruby on Rails developer: Pawan Kumar Gupta from...

workingwithrails.com 09 Jun '12, 12am

Works professionally with Rails Popularity Not ranked yet. Forum Posting Rating 0% When you post on our forums other regis...

Rails 3.1: has_secure_passwordメソッド - Rails 雑感 -...

oiax.jp 06 Jun '12, 10am

この前のエントリー では、Rails 3.1で登場した assign_attributes という渋いメソッドについて書きました。 今回紹介するのも渋い新仕様です。その名も has_secure_password 。 いま、User というモデ...

Obie Fernandez: The Rails 3 Way Highlights: Act...

blog.obiefernandez.com 08 Jun '12, 8am

This behavior matches normal Ruby method inheritance: think of writing an attribute on a subclass as overriding the parent...

@wayoutmind @nlsmith I usually refer to but tho...

guides.rubyonrails.org 05 Jun '12, 1am

Ruby on Rails is not “someone else’s framework.” Over the years, hundreds of people have contributed to Ruby on Rails rang...

Action Mailer Basics:

guides.rubyonrails.org 10 Jun '12, 2am

There are several ways to do this, some people create Rails Observers to fire off emails, others do it inside of the User ...

“Ruby on Railsで複合キーを扱う(1) - Rails 雑感 - Ruby on ...

oiax.jp 03 Jun '12, 9pm

Ruby on Railsでは、データベーステーブルの主キーとしてidというカラムを使うのがデフォルトです。 誤解される方も多いのですが、もちろん主キーの名前は変更できます。たとえば、User モデルに対応するusers テーブルの主キーがui...

Application templates in Rails 3:

everydayrails.com 19 Jun '12, 10pm

I actually got started by learning how to create generators in Rails 3 (used to create custom code in an existing Rails ap...

From spreadsheets to the cloud, Ragic is an easier way to better manage your database

From spreadsheets to the cloud, Ragic is an eas...

e27.sg 09 Jun '12, 2am

Hello there! If you are new here, you might want to subscribe to the RSS feed for updates on this topic. Powered by WP Gre...

Ruby on Rails developer: getutahhomeloans from

workingwithrails.com 08 Jun '12, 7pm

Address: 1099 South Jordan Parkway, South Jordan, UT 84095 Call Now: 801-635-8797 getutahhomeloans Today I am helping peop...

Railscasts - Routing in Rails 3:

railscasts.com 23 Jun '12, 12am

Rails 3 sports a new routing interface. In this episode I show how to translate the old interface into the new one and sho...

What’s New in Edge Rails #23: Week of May 28 -J...

afreshcup.com 04 Jun '12, 4pm

It was a fairly quiet week on the Rails front. Well, if you don't count multiple non-edge dot releases for security fixes....

Open Source Rails

opensourcerails.com 17 Jun '12, 1am

Open Source Rails is a community site dedicated to tracking the best open source Ruby on Rails applications.