Bugs: Browse | Submit New | Admin

[#14788] negative_color option for the Currency formatter is broken

Date:
2007-10-17 04:44
Priority:
3
Submitted By:
Cody Pisto (cpisto)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
negative_color option for the Currency formatter is broken

Detailed description
the negative_color option for the Currency value formatter has no effect,

I fixed it like so:

in components/value_markers.rb

CHANGE: (around line 18)
marker_value = options[:value_formatter].route_format(marker_value, idx, options.merge({:all_values => all_values}))
if options[:value_formatter]


TO:
options[:all_values] = all_values
marker_value = options[:value_formatter].route_format(marker_value, idx, options) if options[:value_formatter]


Problem was options.merge returns a copy of the options hash, so down below where it does an
options.delete(:marker_color_override) always fails because the formatter passes that back by updating the options hash.


Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-10-17 04:47
Sender: Cody Pisto

or better yet, change it to

if options[:value_formatter]
    options[:all_values] = all_values
    marker_value = options[:value_formatter].route_format(marker_
value, idx,
options)
end

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item