Skip to content
This repository has been archived by the owner on May 25, 2018. It is now read-only.

Passing a data value to the Options hash #62

Open
bcackerman opened this issue Aug 7, 2014 · 3 comments
Open

Passing a data value to the Options hash #62

bcackerman opened this issue Aug 7, 2014 · 3 comments

Comments

@bcackerman
Copy link

I have this
{{#ifValue product_type is="installment"}}
where product_type is a data attribute I'm passing in to the custom ifValue helper. Is this possible yet with hamlbars?

@jimsynz
Copy link
Owner

jimsynz commented Aug 8, 2014

I'm sorry, I don't understand the question.

@bcackerman
Copy link
Author

Ok so part of the JSON data that I'm passing looks like this
{ product_type: "credit_line" }

Then in my haml template. I have {{#ifValue product_type is="installment"}}

I created a helper called ifValue which determines if product_type is equal to whatever is inside is=""

I'm trying to see how to write the {{#ifValue product_type is="installment"}} part using your gem and if that's possible. Does that make more sense now? Thanks!

@jimsynz
Copy link
Owner

jimsynz commented Aug 10, 2014

Oh!

=hb 'ifValue product_type is="instalment"' do
  %p blah

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

No branches or pull requests

2 participants