Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Allow helpers directory to be overridden

#1424

This patch allows the helpers directory for helper :all to be overridden.

It can be set using the helpers_dir class accessor on ActionController::Base or its descendants or via config.action_controller.helpers_dir = '/path/to/helpers' in the Rails initializer block.

The helpers directory must be in the load path.

Reported by Sam Pohlenz · November 20th, 2008 @ 10:22 PM

State: committed
Milestone: 2.x
Assigned to: nobody
Importance: none

Activity

  1. DHH
    DHH

    Not that I don't like the patch, but I'm curious as to the use case that prompted this?

    November 22nd, 2008 @ 06:02 PM

  2. Sam Pohlenz
    Sam Pohlenz

    In my latest project (yes, its a CMS), I'm aiming to keep the root folder structure as clean as possible (i.e. only plugins/, themes/, public/, config/, cms/) and keep all code related to the cms core tucked away in its own folder.

    I've done this to steer developers away from extending functionality directly inside the "app" folder and to instead build their functionality as plugins.

    Rails has done very well so far to accommodate this (I've been pleasantly surprised actually) and this is the only pain point (and its a small one) I've come across so far.

    November 23rd, 2008 @ 12:42 AM

  3. Repository
    Repository
    • State changed from new to committed

    (from [bdf995bc5da016e99d1636e62b39c92384263a9c]) Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [#1424 Allow helpers directory to be overridden state:committed]

    Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...

    November 23rd, 2008 @ 12:42 PM

  4. Repository
    Repository

    (from [5ea9f2cac6e136e27d7fef2662412dda25391860]) Allow helpers directory to be overridden via ActionController::Base.helpers_dir (Sam Pohlenz) [#1424 Allow helpers directory to be overridden state:committed]

    Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...

    November 23rd, 2008 @ 01:10 PM