Colin Law wrote:
> I am having difficulty understanding the problem, not knowing about 
> forex rates.  Could you explain the model structure?  

NP.

There is but one model involved.  It contains a collection of currency 
pairs (CAD/USD, CAD/GBP, CAD/JPY, etc.) with specific dates and the 
exchange rate in effect on that date.  So

forex.base
forex.quote
forex.date
forex.rate

A given pair and date only occurs once in the table (composite unique 
index).

Standard Rails convention has the index action returning all rates for 
all currency pairs.  This is probably not much use in this application. 
The show action returns a specific rate for a specific pair and date. 
This is probably useful as is.

Users are typically interested in two additional view:  The most recent 
N rates for a specific currency pair; and the rates for all currency 
pairs on a specific date.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to