diff --git a/front-api/config.rb.example b/front-api/config.rb.example index ad209df..1f96275 100644 --- a/front-api/config.rb.example +++ b/front-api/config.rb.example @@ -27,4 +27,6 @@ module RibicaConfig # larry-price.com/blog/2014/03/18/connecting-to-the-trello-api/ TRELLO_MEMBER_TOKEN = "(enter token here)" TRELLO_BOARD_NAME = "FqDO1eFL" + + BAM_TO_EURO_CONVERSION_RATE = 0.51 end diff --git a/front-api/helpers.rb b/front-api/helpers.rb index 1ad349e..7eb1d53 100644 --- a/front-api/helpers.rb +++ b/front-api/helpers.rb @@ -2,4 +2,12 @@ class Helper def self.money(amount) sprintf('%.2f KM', amount.to_f) end -end \ No newline at end of file + + def self.get_bam_to_euro_conversion_rate + RibicaConfig.BAM_TO_EURO_CONVERSION_RATE + end + + def self.bam_to_euro(amount) + self.get_bam_to_euro_conversion_rate * amount + end +end