There is no way to pass extra attributes to the :javascript
filter like this. You could however use a :plain
filter along with a normal script
tag to allow indenting your javascript code:
%script{:'data-turbolinks-eval' => 'false', :foo => 'bar'}
:plain
if(someCondition()) {
doSomething();
}
produces:
<script data-turbolinks-eval='false' foo='bar'>
if(someCondition()) {
doSomething();
}
</script>