vendredi 15 mars 2019

Problem with getting Rails ENV variable in yml file, it give float instead of whole string

I have an Environment variable in me env file that is

SOME_CLIENT_ID= 574536488180.574908975999

and I included this in my secrects.yml file like this

some_client_id: <%= ENV['SOME_CLIENT_ID'] %>

and when I'm getting this in my .rb and rails console with Rails.application.secrets.some_client_id this give me 574536488180.575 instead of 574536488180.574908975999 and ENV['SOME_CLIENT_ID'] Gives accurate value. Rails.application.secrets.some_client_id seems like it give me round of value but I needed as I entered orignal value.

how can I tackle this issue? please help me. thanks

Aucun commentaire:

Enregistrer un commentaire