-3
如何將fixnum轉換爲ruby中的數組?將Fixnum轉換爲ruby中的數組
例如:
s = SituationType.all(:conditions => {:name => 'did not match retrieved design - text misspelled'}).collect(&:id)
result: [10034, 10055]
sf = situation_type_id = SituationType.find_by_name('did not match retrieved design - text misspelled').id result: 10034
s -sf says, TypeError: can't convert Fixnum into Array