rails, routes & subdomains

I've tried a couple different things but can't seem to get this to
work.

As part of my app I have a blog that is run at myapp.com/posts

I would like to be able to setup so that blog.myapp.com points to that
controller. Not sure how to configure the subdomain and my routes.rb
to do this?

if someone can point me in the right direction I would appreciate it.
Thanks

polomasta wrote:

I've tried a couple different things but can't seem to get this to
work.

As part of my app I have a blog that is run at myapp.com/posts

I would like to be able to setup so that blog.myapp.com points to that
controller. Not sure how to configure the subdomain and my routes.rb
to do this?

if someone can point me in the right direction I would appreciate it.
Thanks

#in config/routes.rb
map.connect '', :controller => "posts"