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?
Its in release notes for rails 4.1
Since
keep_if
is a mutator method, its removed fromRelation