lib/pollster/chart.rb in pollster-0.2.2 vs lib/pollster/chart.rb in pollster-0.2.3

- old
+ new

@@ -49,10 +49,10 @@ private def self.create(data) data = Hash[*data.map { |k, v| [k.to_sym, v] }.flatten(1)] data[:last_updated] = Time.parse(data[:last_updated]) - data[:estimates].map! { |estimate| {:choice => estimate['choice'], :value => estimate['value']} } + data[:estimates].map! { |estimate| {:choice => estimate['choice'], :value => estimate['value'], :chance => estimate['chance']} } if data[:estimates_by_date] data[:estimates_by_date] = data[:estimates_by_date].map do |x| estimate = hash_keys_to_sym(x) estimate[:date] = Date.parse(estimate[:date]) estimate[:estimates] = estimate[:estimates].map { |e| hash_keys_to_sym(e) }