0.0
No commit activity in last 3 years
No release in over 3 years
Foreign Exchange for your Rails app.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

active_exchange¶ ↑

Active Exchange is a Rails Engine based Gem that is using the XavierMedia API. You can now get daily Exchange rates that are then uploaded into your own ExchangeRate table in the Database for use inside your Rails app.

Using a Rake task, that is ran once a day, you collect all the exchange rate information.

Now inside your rails app, you can convert one currency into another, or save everything into one currency on the fly.

By going to XavierMedia once a day, you get stable rates to use throughout the day, which should be sufficient enough for your online store.

I personally wouldn’t use this if my model was, say an F/X trader on a big time exchange where second by second data is needed, however.

Usage¶ ↑

  • add code below to your GEMFILE (Rails 3)

    gem 'active_exchange'
    
  • For now: Copy the db/migrate file– Will fix later hopefully.

  • Run “rake db:migrate” to migrate the migration files.

  • Run the rake task : “rake active_exchange:daily_seed” to get yesterday’s closing Exchange Rate data (When doing today’s it’s hit and miss).

You can now integrate the data into your app as you see fit.

Note on Patches/Pull Requests¶ ↑

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but

    bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright © 2009 pjammer. See LICENSE for details. MIT.