Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>With minimal touching of the main site, it might be possible to use the Ruby code from it while extending the templates and changing the styles. I have worked on that extensively in Django and the layout can look like:</p> <pre><code>project/ sites/ site_one/ templates/ models.py settings.py urls.py views.py site_two/ templates/ models.py settings.py urls.py views.py base_app/ settings.py </code></pre> <p>You could try do something similar in Rails:</p> <pre><code>main_webapp/ app/ config/ ... sites/ site_one/ controllers/ models/ views/ site_two/ controllers/ models/ views/ </code></pre> <p>Assuming the functionalities are identical across sites but they just have different layout and styles, there will be none or very little model and controller code. Should you wish to add more functionality to specific sites, just stick the code under the desired site folder.</p> <p>Django also have the concept of <a href="http://docs.djangoproject.com/en/dev/ref/contrib/sites/" rel="nofollow noreferrer">Sites</a> and the <a href="http://docs.djangoproject.com/en/dev/ref/settings/#template-loaders" rel="nofollow noreferrer">ability</a> to look for templates in one specific project folder and an app folder. You could try to copy those features and bring them over to Rails to achieve running multiple site from one codebase.</p> <p>I recognize that you are looking for a Rails solution but you can still checkout how it's done in Django and copy some of the useful features to the other side. If I like a Rails specific feature, I'll port it other to Django/Python.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload