RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: rzane
Don't forget .includes(:owner, :trackable)
.includes(:owner, :trackable)
I use request.subdomains.first rather than request.subdomain as recommended by DHH: http://37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-rails
request.subdomains.first
request.subdomain
If you use request.subdomain and use an IP address as the URL, request.subdomain will include the IP address.
Don't forget
.includes(:owner, :trackable)
I use
request.subdomains.first
rather thanrequest.subdomain
as recommended by DHH: http://37signals.com/svn/posts/1512-how-to-do-basecamp-style-subdomains-in-railsIf you use
request.subdomain
and use an IP address as the URL,request.subdomain
will include the IP address.