Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4612

Optimize Exchange Flow

$
0
0

im actually working in ruby on rails and im watching methods that convert values according to specific exchange rate.For example, for each value of an account, it makes the following execution:

@accounts.examplevalue = @params["examplevalue"].to_f * currency_exchange_rate.to_f

And "currency_exchange_rate" is calculated according to different ways, like taking the exchange rate from database instead of api calls or excel upload.

My question is: do you know other ways that can optimize the full process without moltiply each single value for "currency_exchange_rate"? Maybe like calling '@accounts.examplevalue_converted'?Thanks


Viewing all articles
Browse latest Browse all 4612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>