Is Rails the equivalent of a Django site structure?

I’m studying Ruby on Rails, and I’m starting from exploring the Django system. The only thing I liked about Django was the Site Framework . Is there an equivalent to this in Rails?

Basically, I'm looking for one Rails application to run across multiple sites - and I want to automatically filter models based on the host name. I am currently working with Rails 3.0.5. Any thoughts / links / examples would be greatly appreciated!

+4
source share
1 answer

I really spent a lot of time studying this recently. The quick answer is no, there is no clear equivalent. You can approach this behavior from two angles, depending on how independent you want your sites to be. On the more independent side, you can have several applications that exchange behavior using Rails Engines , where you basically host your parent application as a gem. On the less independent side, you can do various actions based on the domain / subdomain .

Which one is closer to what you want? What things do you want to customize?

+2
source

Source: https://habr.com/ru/post/1346574/


All Articles