Hello! I'm using the latest version of the gem (1.4.0) and noticed a slightly odd behavior:
Say I have the following table
# config/schema.rb
create_table "examples", force: :cascade do |t|
t.string "name"
t.jsonb "configuration"
end
and model
# app/models/product.rb
class Example< ApplicationRecord
jsonb_accessor :configuration,
foo: [:boolean, { default: false }],
bar: [:boolean, { default: false }],
baz: [:boolean, { default: false }]
end
if then I do
Example.select("id, name").first.attributes
I get
=> {"id"=>1, "name"=>"Example One", "foo"=>false, "bar"=>false, "baz"=>false}
Even though I did not include the configuration column or any of its properties in the select clause. Is that expected?