help on helper module inclusion/extension
Jonas Pfenniger
zimbatm at oree.ch
Tue Nov 6 12:26:27 EST 2007
The root of the problem is that a module doesn't propagate newly
included methods on classes or modules where it's been alreay
included. take :
module A; def a; end; end
module B; def b; end; end
class C; end
where A is included in B and B in C. Depending on the inclusion order,
you won't get the same result.
class C; include B; end
module B; include A; end
C.instance_methods #=> [... "b" ... ]
now...
module B; include A; end
class C; include B; end
C.instance_methods #=> [... "a", "b", ... ]
---- end of explanation
In Camping 1.5.180, you'll have to include your module in Helpers,
Views and Mab.
Due to some changes in Camping-trunk, you'll only have to include your
module in Helpers and Views.
--
Cheers,
zimbatm
More information about the Camping-list
mailing list