2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00
discourse/lib/freedom_patches/ember_handlebars.rb
2020-05-15 16:07:35 -04:00

15 lines
350 B
Ruby

# frozen_string_literal: true
class Ember::Handlebars::Template
# TODO: Remove this after we move to Ember CLI
def template_path(path, config)
root = config.templates_root
config.templates_root.each do |k, v|
path = path.sub(/#{Regexp.quote(k)}\//, v)
end
path.split('/').join(config.templates_path_separator)
end
end