Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention generic options config in readme #179

Open
mslourens opened this issue Apr 8, 2021 · 4 comments
Open

Mention generic options config in readme #179

mslourens opened this issue Apr 8, 2021 · 4 comments

Comments

@mslourens
Copy link

mslourens commented Apr 8, 2021

I was looking for a way to set runtime options for handlebars, and came across the changelog for version 0.6.5, where this was mentioned, but in the readme it was not mentioned at all. It would be a good idea to mention it somewhere, so this option can be used. This is the way to set runtime options like allowProtoPropertiesByDefault, right?

@Cortlandd
Copy link

Cortlandd commented Feb 3, 2022

@mslourens Bump. Did doing so work for you?

@Cortlandd
Copy link

I'm thinking is the following what we need?

require 'handlebars_assets'

HandlebarsAssets::Config.options = {
  allowProtoMethodsByDefault: true,
  allowedProtoMethods: true    
}

@mslourens
Copy link
Author

yes, that's what I meant.

@Cortlandd
Copy link

I added that to config/initializers/handlebars.js but no luck. Went with

HandlebarsTemplates['TEMPLATE']({file: { name: file.name }})

but previously had

HandlebarsTemplates['TEMPLATE']({file: file})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants