Let's say the Translation model includes acts_as_paranoid.
Typical Rails Base.all.joins(:translations) will correctly have INNER JOIN ... ON ... ."deleted_at" IS NULL
However, the scopes/queries generated by Mobility will not include this ON condition.
I'm not sure how to go about fixing this... It seems the ActiveRecord interface to joins is mostly private and I didn't find a way to get a complete join (e.g. Arel join with all conditions) from ActiveRecord. I didn't find a way in ActiveRecord to perform a join with a table alias (for an association with taking into account the ON conditions).
Any suggestion? Is there at least a single place / setting in Mobility where it would be possible to add the additional conditions for the joins Mobility generates internally?
Let's say the Translation model includes acts_as_paranoid.
Typical Rails
Base.all.joins(:translations)will correctly haveINNER JOIN ... ON ... ."deleted_at" IS NULLHowever, the scopes/queries generated by Mobility will not include this
ONcondition.I'm not sure how to go about fixing this... It seems the ActiveRecord interface to joins is mostly private and I didn't find a way to get a complete join (e.g. Arel join with all conditions) from ActiveRecord. I didn't find a way in ActiveRecord to perform a join with a table alias (for an association with taking into account the ON conditions).
Any suggestion? Is there at least a single place / setting in Mobility where it would be possible to add the additional conditions for the joins Mobility generates internally?