Skip to content
A rails plugin to convert currencies into another currency. now 61 currencies are available. This plugin uses ExchangeRateAPI. See also www.exchangerate-api.com and get an API key to use this plugin.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
assets/views/currency_convert
lib
tasks
test
MIT-LICENSE
README.md
Rakefile
init.rb
install.rb
uninstall.rb

README.md

Introduction

CurrencyConvertOnRails is a rails plugin to convert currencies into another currency. 61 currencies are available now. Thils plugin has an easy-to-use interface that uses Ajax. If you have something wrong with the plugin, Contact me at (mail@yukinishijima.net).

Requirement

Make sure prototype.js(for rails < 3) or jquery.js(for rails >= 3) is included to view tamplates. If you need to use this plugin with jquery and rails < 3, send a message to mail@yukinishijima.net . I'll give you a solution.

Installation

Here you can see 4 steps to install the plugin, not so big deal.

  1. Check out git@github.com:yuki24/Currency-Convert-on-Rails.git
  2. Get your API key to register to http://www.exchangerate-api.com/
  3. Do the following command.

    rake currency_convert:setup api_key="YOUR-API-KEY"

    For example, if your API key is "igi7By4dvx4cst":

    rake currency_convert:setup api_key="igi7By4dvx4cst"

  4. Do something like this: If you want to embed the currency convert form in "MoneyController#List", Add one phrase on the top of the controller.

    MoneyController < ApplicationController enable_currency_convert "JPY" # replace JPY with another currency as default.

    ...

    end

    And then add the following code in the view "list.html.erb".

    <%= currency_select_view( :amount => 100, :loading => '', :default => 'How mach in other currencies?') %>

    also, you can write the form this way.

    <%= currency_select_view( :amount => 'amount_field', :loading => '', :default => 'How mach in other currencies?') %>

  5. now ready to convert!

Copyright (c) 2010 Yuki Nishijima, released under the MIT license.

Something went wrong with that request. Please try again.