I'm attempting to upgrade from Ruby 2.3.8 to Ruby 2.5.4, but have
encountered and issue with the association_proxies plugin since upgrading:
*Environment:*
ruby 2.5.4
sequel 5.4.0
sequal_pg 1.11.0
*Sequel Plugins:*
Sequel::Model.plugin :timestamps
Sequel::Model.plugin :association_proxies
Sequel::Model.plugin :association_dependencies
Sequel::Model.plugin :json_serializer
Sequel::Model.plugin :defaults_setter
*Model:*
module DonorSee
class User < Sequel::Model
...
one_to_many :gifts_given, class: 'DonorSee::Gift'
...
end
end
*Error:*
pry(main)> User.with_pk(98).gifts_given.sum(:amount_cents)
NoMethodError: undefined method `+' for :amount_cents:Symbol
The above used to work, thanks to the association_proxies plugin. Now it
doesn't and I'm not sure why.
Alternatively, I can execute the sum() method on a filtered Gift dataset
like so:
pry(main)> Gift.where(user_id: 98).sum(:amount_cents)
=> 57400
I've tried looking in various release notes for an answer, but am stuck.
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.