#950 ✓resolved
Bryan Larsen

subsite generator default options suboptimal

Reported by Bryan Larsen | May 16th, 2011 @ 05:43 PM | in Hobo 1.3 (Rails 3)

In Hobo 1.0, we force the user to explicitly set either the --no-front-site option or the --make-front-site option. In 1.3, the --no-front-site is the default.

I believe this is a mistake, that the --make-front-site is generally the right option for users. Without it, there is duplicate code between application.dryml and admin_site.dryml, triggering bug #942 and/or just making things slower.

I can understand why you wouldn't want to make --make-front-site the default since it's more potentially destructive of the user's application, which is why I like the 1.0 choice of forcing the user to choose. This makes sure the user makes a clear decision rather than choosing the default.

Here's the USAGE I'm going to add to the admin_site and the subsite generators:

Description:

    Creates a subsite, a namespaced section of your application.

    Controllers for the subsite are created in
    app/controllers/<subsite_name>/ and views are also in their own
    subdirectory.   This allows you to have two different controllers
    and two different sets of views for the same model.

    The subsite will use app/views/taglibs/<subsite_name>_site.dryml
    as well as app/views/taglibs/application.dryml.  This allows you
    to easily set different themes and choose different CSS files for
    the subsite.  The remaining views of your application that are not
    under a subsite load both application.dryml and front_site.dryml.

    It is thus recommended that you ensure that
    <subsite_name>_site.dryml and application.dryml do not repeat
    code, such as the inclusion of rapid or the setting of the theme.
    One easy way of ensuring this is to use the --make-front-site
    option.

    The difference between hobo:admin_site and hobo:subsite is that
    hobo:admin_site limits the subsite to use by administrators only.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Referenced by

Pages