So how come Builder is now a root level module and not available
through
ActionView::TemplateHandlers?
Because it always was at the root level. ActionView was significantly
refactored in 2.1; IIRC, TemplateHandler didn't exist before 2.1, so
there was no ActionView::TemplateHandlers::Builder. Now there is one
and since you're in the context of a TemplateHandler, ruby thinks that
Builder means ActionView::TemplateHandlers::Builder (which is the
TemplateHandler that allows you to write view with builder (much as
there are handlers that allow you to use, erb, rjs etc....) which is a
complete separate thing to Builder (as provided by the builder library).
Because it always was at the root level. ActionView was significantly
refactored in 2.1; IIRC, TemplateHandler didn't exist before 2.1, so
there was no ActionView::TemplateHandlers::Builder. Now there is one
and since you're in the context of a TemplateHandler, ruby thinks that
Builder means ActionView::TemplateHandlers::Builder (which is the
TemplateHandler that allows you to write view with builder (much as
there are handlers that allow you to use, erb, rjs etc....) which is a
complete separate thing to Builder (as provided by the builder library).
Fred
That makes sense.
Is this a bug then?
Should Builder::XmlMarkup be moved into a new package given this
namespace collision?
While it's unfortunate (and it's hard to foresee all combinations like this) I see this as namespacing working as it should. it would be more than a little odd to rename the builder library because of some rails implementation detail