Rails 2.0.2 Active_scaffold : config.columns with 2 columns

20 Views Asked by At

I would like to work with couple of items example : traitment and severity : T1,1; T1,2; T2,3. Only these values are possible and are already in table couples. in another table toto, i need to register these couples in 2 columns (not in 1 column)

toto_controller.rb

.../...
    config.columns[:traitment].form_ui = :select
    config.columns[:traitment].options = Couple.find(:all).map {|m| [m.traitment + " - sev " + m.severity.to_s , m.traitment]}

of course it doesn't work Any idea?

0

There are 0 best solutions below