Rate#for will now return the most current rate for the user matching the parameters. #1920
This commit is contained in:
+3
-1
@@ -33,6 +33,8 @@ class Rate < ActiveRecord::Base
|
||||
date
|
||||
],
|
||||
:order => 'date_in_effect DESC')
|
||||
nil
|
||||
|
||||
return nil if rates.empty?
|
||||
return rates[0].amount
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user