ifad / chronomodel

Temporal PostgreSQL (9.4+) system with "flashback" framework for ActiveRecord (7.0+)
MIT License
194 stars 21 forks source link

Errors with Rails 5.1.6 #80

Closed pzac closed 5 years ago

pzac commented 5 years ago

Project.as_of(1.day.ago.utc).first works in rails 5.1.4 and 5.1.6 Project.includes(:country).as_of(1.day.ago.utc).first works in rails 5.1.4, gives

ArgumentError: #<struct ChronoModel::Patches::Preloader::AS_OF_PRELOAD_SCOPE as_of_time=2018-10-28 10:27:47 UTC, values={}, where_clause=#<ActiveRecord::Relation::WhereClause:0x00007fb21cac0780 @predicates=[], @binds=[], @referenced_columns=#<Set: {}>>, joins_values=[]> is not an ActiveRecord::Relation
from /Users/pzac/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activerecord-5.1.6/lib/active_record/relation/spawn_methods.rb:47:in `merge!'

in rails 5.1.6

pzac commented 5 years ago

Rails 5.1.5 fails, too.

vjt commented 5 years ago

Bogus, this error was occurring on an app that had CM pinned at 1f53d8bc. Newer CM versions work correctly on Rails 5.1.x.