Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert back to
join
rather than include
.
AR2's `join` will make the found model instance read-only, hence the previous change to use `include`. However, `include` will add columns from the slug table to the query, so queries that use unqualified column names and work without FriendlyId, will fail when FriendlyId is used if a column name from the slug table is used in a scope or find conditions. This change simply sets the `:readonly` option to `false` unless it is explicitly set to something truthy. This doesn't feel entirely right but in practice ends up working better. closes #75
- Loading branch information