brocktimus

Results 16 comments of brocktimus

OK apparently that includes behaviour is working as intended https://github.com/rails/rails/issues/16241. So I'm going to have a look and see how hard it would be to make includes order independent. But...

It seems to be hitting: - https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/join_dependency.rb#L178 - ActiveRecord::Assocations::JoinDependency#table_aliases_for - https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/alias_tracker.rb#L59 - ActiveRecord::Assocations::AliasTracker#aliased_table_for - https://github.com/rails/rails/blob/master/activerecord/lib/active_record/associations/alias_tracker.rb#L69 - ActiveRecord::Assocations::AliasTracker#aliased_name_for The last of which you can see does different aliasing logic based on...

@diresquirrel thinking on it more mine will only work if its the only belongs_to of that table being searched for. Either by being the only one in the definition or...

Maybe @wvanbergen can fix it quickly but I couldn't figure out a nice way. He's on holidays (I think) so unsure if he will reply. I've started deconstructing the QueryBuilder...

Just so everyone is aware, my current work in progress Arel Builder is https://github.com/brocktimus/scoped_search/blob/arel_builder/lib/scoped_search/arel_builder.rb. I'm basically porting all SQL generation into Arel by just visiting the internal AST. Still got...

Not yet. All this stuff is in spare time which is severely lacking of late :-1:.