in Rails 4.0.4 this code work:
mailboxes = Mailbox.order(:mailbox)
mailboxes.keep_if do |mailbox|
# test
end
in Rails 4.1.0 it break with NoMethodError (undefined method keep_if for <Mailbox::ActiveRecord_Relation:0x5494f80>)
and has to be changed to
mailboxes = Mailbox.order(:mailbox).to_a
mailboxes.keep_if do |mailbox|
# test
end
I don't find any information about that
Any idea?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…