1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| User.all User Load (0.4ms) SELECT "users".* FROM "users" [ [0] #<User:0x00007fd4c407c5b0> { :id => 1, :name => "chester", :email => "[email protected]", :tel => "0123456789", :created_at => Mon, 30 Aug 2021 05:00:22.542415000 UTC +00:00, :updated_at => Mon, 30 Aug 2021 05:00:22.542415000 UTC +00:00 }, [1] #<User:0x00007fd4c407c4e8> { :id => 2, :name => "chester_2", :email => "[email protected]", :tel => "9876543210", :created_at => Mon, 30 Aug 2021 08:00:36.836992000 UTC +00:00, :updated_at => Mon, 30 Aug 2021 08:00:36.836992000 UTC +00:00 }, [2] #<User:0x00007fd4c407c420> { :id => 3, :name => "chester_3", :email => "[email protected]", :tel => "543219876540", :created_at => Mon, 30 Aug 2021 08:00:53.073957000 UTC +00:00, :updated_at => Mon, 30 Aug 2021 08:00:53.073957000 UTC +00:00 } ]
User.pluck(:name) [ [0] "chester", [1] "chester_2", [2] "chester_3" ]
|