I wrote a simple custom directive, and have it pass all attributes through as regular element attributes. The syntax of the tag as follows:
<@link_to controller="unobtrusive" action="do-get" data-target="result">Do Get</@>
Unfortunately, I get an exception:
Caused by: freemarker.core.ParseException: Encountered "-" at line 32, column 56 in unobtrusive/index.ftl. Was expecting: "=" ...
This is because it cannot seem to parse "data-target" attribute. When I change it to "data_target" with the underscore, all is fine.... but I really would need the dash: "-".
Can someone help?
Thanks,
Igor