The answer provided by @vee will render this correctly. The reason you are getting a syntax error is because data-addr: 'here'
is not valid ruby code. That is, you can't have use the JSON hash notation with a key containing a hyphen character. You can modify it to work properly like this:
<%= label_tag(:address, t('ui.reservations.pickup'), 'data-addr' => 'here' %>
But the recommended approach is to declare a nested hash for 'data' attributes:
<%= label_tag(:address, t('ui.reservations.pickup'), :data => {:addr => 'here'} %>
Or simply (as @vee suggested):
<%= label_tag(:address, t('ui.reservations.pickup'), data: {addr: 'here'} %>
[OP edit:] I also found that underscores generate dashes! For example:
<%= label_tag(:address, t('ui.reservations.pickup'), data: {from_base: 'here'} %>
generates
<label for="address" data-from-base="here">
pickup:
</label>