-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
each_instance
incorrectly sets the column types, for example
class User < ActiveRecord::Base
enum state: {
active: 1,
}
end
pp User.first
# #<User:0x00007f884e1bee40
# id: 1,
# created_at: Wed, 17 Apr 2019 14:33:34 AEST +10:00
# state: "active">
pp User.each_instance.first
# #<User:0x00007f884e1bee40
# id: 1,
# created_at: 2019-04-16 22:24:59 UTC
# state: 1>
Expected.
in the example above objects from both queries should be identical
rails -v => Rails 6.0.3.4
ruby -v => ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
Metadata
Metadata
Assignees
Labels
No labels