static public function load()
    {
        if (!self::$helpersLoaded) {
            if (($router = Rails::application()->dispatcher()->router()) && ($route = $router->route())) {
                $controllerHelper = Rails::services()->get('inflector')->camelize($route->controller()) . 'Helper';
                array_unshift(self::$appQueue, $controllerHelper);
            }
            $appHelper = 'ApplicationHelper';
            array_unshift(self::$appQueue, $appHelper);
            
            foreach (array_unique(self::$appQueue) as $name) {
                self::loadHelper($name);
            }
            foreach (array_unique(self::$queue) as $name) {
                self::loadHelper($name, true);
            }
            
            # Add base helper
            self::$helpers[self::BASE_HELPER_NAME] = new Helper\Base();
            
            self::$helpersLoaded = true;
        }
    }
static public function load()
    {
        if (!self::$helpersLoaded) {
            if (($router = Rails::application()->dispatcher()->router()) && ($route = $router->route())) {
                $controllerHelper = Rails::services()->get('inflector')->camelize($route->controller()) . 'Helper';
                array_unshift(self::$appQueue, $controllerHelper);
            }
            $appHelper = 'ApplicationHelper';
            array_unshift(self::$appQueue, $appHelper);
            
            foreach (array_unique(self::$appQueue) as $name) {
                self::loadHelper($name);
            }
            foreach (array_unique(self::$queue) as $name) {
                self::loadHelper($name, true);
            }
            
            # Add base helper
            self::$helpers[self::BASE_HELPER_NAME] = new Helper\Base();
            
            self::$helpersLoaded = true;
        }
    }
static public function load ( ) { if ( ! self :: $ helpersLoaded ) { if ( ( $ router = Rails :: application ( ) -> dispatcher ( ) -> router ( ) ) && ( $ route = $ router -> route ( ) ) ) { $ controllerHelper = Rails :: services ( ) -> get ( 'inflector' ) -> camelize ( $ route -> controller ( ) ) . 'Helper' ; array_unshift ( self :: $ appQueue , $ controllerHelper ) ; } $ appHelper = 'ApplicationHelper' ; array_unshift ( self :: $ appQueue , $ appHelper ) ; foreach ( array_unique ( self :: $ appQueue ) as $ name ) { self :: loadHelper ( $ name ) ; } foreach ( array_unique ( self :: $ queue ) as $ name ) { self :: loadHelper ( $ name , true ) ; } # Add base helper self :: $ helpers [ self :: BASE_HELPER_NAME ] = new Helper \ Base ( ) ; self :: $ helpersLoaded = true ; } }
Actually include the helpers files.

Application and current controller's helper are added here,
to make sure they're top on the list.
Actually include the helpers files .