Multidomain application in rails

Hello everyone =)

I need your help on a project I have.

How to create a Rails app to can be used in different domains.

We can imagine such a system for blogs.

Where a new blog is created with its own domain and for hundreds or thousands of blogs (the blog is just one example)

What options I have to do it in rails? it’s posible ?

Because if I have to copy the files for each project rails maintenance I not think it’s an option.

I hope someone can help me.

Greetings and thanks.

Have a look at "Multitenancy in Rails"