Welcome to the float hell. This is why you should never use floats in non-scientific applications
Especially when inter-operating between different languages.
I would suggest that you should send string to the backend, so instead of:
<%= for market_id <- @market_ids do %>
<button type="button" class="btn btn-default" drab-click="subscribe_market(<%= market_id %>)"><%= market_id %></button>
<% end %>
do:
<%= for market_id <- @market_ids do %>
<button type="button" class="btn btn-default" drab-click="subscribe_market('<%= market_id %>')"><%= market_id %></button>
<% end %>
Or multiple it by 10000000 and use integer.
That would save you a lot of sleepless nights ![]()






















