lib/masterview/template_spec.rb in masterview-0.2.5 vs lib/masterview/template_spec.rb in masterview-0.3.0
- old
+ new
@@ -115,11 +115,12 @@
builder = MasterView::Analyzer::Builder.new(content_hash)
@build_list.each do |li|
#Log.debug { li.inspect }
con = builder.data(li.name, li.index)
if li.import
- con = con.gsub NamespacePrefix+'generate', NamespacePrefix+'import'
- con.gsub! NamespacePrefix+'gen_partial', NamespacePrefix+'import_render'
+ mv_ns = DirectiveRegistry.current.mv_namespace_prefix
+ con = con.gsub mv_ns+'generate', mv_ns+'import'
+ con.gsub! mv_ns+'gen_partial', mv_ns+'import_render'
end
out << con
end
template = out.join
if options[:write_to_file]