alecdotninja / active_record_distinct_on

Support for `DISTINCT ON` statements when querying with ActiveRecord
MIT License
34 stars 11 forks source link

undefined method 'distinct_on' #20

Closed sam0x17 closed 1 year ago

sam0x17 commented 2 years ago

We are trying to use this gem within a Ruby on Jets app using active record 6.1.5.1. All attempts to get this gem to work including manually doing require 'active_record_distinct_on' seem to fail with errors like:

NoMethodError (undefined method `distinct_on' for #<Message::ActiveRecord_Relation:0x0000563c27acdc08>)

Anything I can do to get this to work?

alecdotninja commented 2 years ago

I have not used Ruby on Jets personally.

A shot in the dark: Have you tried manually requiring the gem and calling ActiveRecordDistinctOn.install?

alecdotninja commented 1 year ago

Since I haven't heard back in a while or been able to reporduce this myself, I am going to close this issue for now. Please feel free to reopen it if my suggestion does not solve the problem.