Hi all,

i thing the bug can be resolved with a simple patch to 
/usr/share/redmine/app/helpers/settings_helper.rb,:

def setting_multiselect(setting, choices, options={})
    setting_values = Setting.send(setting)
    setting_values = [] unless setting_values.is_a?(Array)

    setting_label(setting, options) +
      hidden_field_tag("settings[#{setting}][]", '') +
      choices.collect do |choice|
        text, value = (choice.is_a?(Array) ? choice : [choice, choice])
        content_tag('label',
          check_box_tag("settings[#{setting}][]", value, 
Setting.send(setting).include?(value)) + text.to_s,
          :class => 'block'
        )
      end.join

Replace the last line end.join by end.reduce(:<<)  :

the setting_multiselect function become :

def setting_multiselect(setting, choices, options={})
    setting_values = Setting.send(setting)
    setting_values = [] unless setting_values.is_a?(Array)

    setting_label(setting, options) +
      hidden_field_tag("settings[#{setting}][]", '') +
      choices.collect do |choice|
        text, value = (choice.is_a?(Array) ? choice : [choice, choice])
        content_tag('label',
          check_box_tag("settings[#{setting}][]", value, 
Setting.send(setting).include?(value)) + text.to_s,
          :class => 'block'
        )
      end.reduce(:<<) 

il you think this is acceptable solution, is the package maintainer can make a 
patch and a new package ?

Thans

PS: Sorry for my poor english. ;)

Guillaume Pancak
[email protected]





_______________________________________________
Pkg-ruby-extras-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers

Reply via email to