Subdomains

hi,

Is there a way for me to have subdomains on my rails project?

For example, if I create a post, i get this URL- http://www.localhost:3000/posts/#\#\#\# (what ever number)

How can I make the route so that it is---- title.localhost:3000/

title is a field of my posts.

Is there a way to do that? OR if that's too complicated, then how do i replace the /posts/##### with /post.title?

THANKS!

You can do that with request.subdomains inside a controller. See http://api.rubyonrails.org/classes/ActionController/Request.html#M000526

If you want to "change" your primary key (or the key used for search) try with to_param. See http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001840

Regards.

Franco Catena.