jimsynz / hamlbars

Some extensions to HAML to allow generation of Handlebars templates.
https://github.com/jamesotron/hamlbars.git
MIT License
179 stars 43 forks source link

Problem with _action and quotes #58

Open AntonTrapp opened 10 years ago

AntonTrapp commented 10 years ago
hb 'linkTo "map.content.plinks"', 'tagName' => 'li' do
  %a{_action: '"showAnimated" "map.content.plinks" model "content"', bind: {href: "view.href"}} Plinks

leads during test mode to a Error: Barber::PrecompilerError: Pre compilation failed error:

{{#linkTo "map.content.plinks" tagName="li"}}<a {{bind-attr href="view.href"}} {{action ""showAnimated"" "map.content.plinks" model "content"}}>Plinks</a>{{/linkTo}}

The _hb part seems to work / the _action seems to change the quotation

hamlbars (2.1.1) ember-data-source (0.14) ember-rails (0.14.1) ember-source (1.2.0) ruby-2.1.1

AntonTrapp commented 10 years ago

Quick workaround: instead of

_action: '"name" "whatever"'

using

_action: "name 'whatever'"

is working for me. So if there is no serious reason inside the code base this can be closed...