We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not got time to dig into this one but after an update to Ruby 2.0.0-p0, calls like:
@image.views.last_days(7).sum
Throws Mongoid::Tracking::ReaderExtender can't be coerced into Fixnum.
Mongoid::Tracking::ReaderExtender can't be coerced into Fixnum
@image.views.last_days(7).map{|v|v.to_f}.sum.to_i
Works as a hacky workaround - #to_i in the map function or #total both fail, to_f seems to work.
The text was updated successfully, but these errors were encountered:
I swapped "other + @ToTal" in the first argument of the initializer and it resolved the issue for me.
def +(other) return @total + other unless other.is_a?(ReaderExtender) self.class.new(other + @total, @hours.zip(other.hourly).map!(&:sum)) end
Sorry, something went wrong.
No branches or pull requests
Not got time to dig into this one but after an update to Ruby 2.0.0-p0, calls like:
Throws
Mongoid::Tracking::ReaderExtender can't be coerced into Fixnum
.Works as a hacky workaround - #to_i in the map function or #total both fail, to_f seems to work.
The text was updated successfully, but these errors were encountered: