help on helper module inclusion/extension

Ronald Evangelista ironald at gmail.com
Tue Nov 6 04:26:34 EST 2007


I want to include helper methods included to my Camping App from by
requiring an external file but I can't seem to include helpers from
another module.

module CampingHelpers
    def self.included(base)
        base::Helpers.send(:include, Helpers)
    end
    module Helpers
        def show_test
            p "test"
        end
    end
end

Camping.goes :CampingApp
...
module CampingApp::Helpers
     include CampingHelpers
end
...
the show_test method doesn't get included at all.
is it because of camping eval'ling to S.

any help would be appreciated.
thanks!


-- 
|^^^^^^^^^^^^\ .||
|NALDEVNGELSTA.___||'""|""\___,
| ________________ l | |__|__|_|)
(@!)!(@)"""""**|(@) (@)****|(@)

(¯`'•.¸(¯`'•.¸(¯`'•.¸ . Have a Terrific Day!  .•'´¯)¸.•'´¯)¸.•'´¯)¸.•


More information about the Camping-list mailing list