lib/roi/rentability.rb in roi_calculator-0.1.5 vs lib/roi/rentability.rb in roi_calculator-0.1.6
- old
+ new
@@ -11,10 +11,10 @@
include RentabilityPeriods
attr_accessor :rentabilities
attr_reader :id, :start_date, :end_date, :skip_on_gap
def initialize(options)
- @id = options[:id]
+ @id = options[:id].try(:to_i)
@start_date = options[:start_date]
@end_date = options[:end_date] || Date.today - 1
@skip_on_gap = false
post_initialize(options)
end