lib/handlebars_assets/config.rb in handlebars_assets-0.20.1 vs lib/handlebars_assets/config.rb in handlebars_assets-0.20.2

- old
+ new

@@ -9,11 +9,12 @@ attr_writer :compiler, :compiler_path, :ember, :multiple_frameworks, :haml_options, :known_helpers, :known_helpers_only, :options, :patch_files, :patch_path, :path_prefix, :slim_options, :template_namespace, :precompile, :haml_enabled, :slim_enabled, :handlebars_extensions, :hamlbars_extensions, :slimbars_extensions, - :amd, :handlebars_amd_path, :amd_with_template_namespace + :amd, :handlebars_amd_path, :amd_with_template_namespace, + :chomp_underscore_for_partials def compiler @compiler || 'handlebars.js' end @@ -121,9 +122,17 @@ # path specified by the require.js paths # during configuration for the handlebars def handlebars_amd_path @handlebars_amd_path || 'handlebars' + end + + # Indicate if leading underscore should be allowed + # when creating partial definition. + # Allows compatibility with handlebars-rails + # https://github.com/cowboyd/handlebars-rails/blob/f73a2d11df8aa2c21d335b8f04a8c5b59ae6a790/lib/handlebars-rails/tilt.rb#L18 + def chomp_underscore_for_partials? + @chomp_underscore_for_partials || false end private def generate_known_helpers_hash