Does comparing the @where_values, @having_values, etc on the Relation
do the trick for you? That doesn't require a call to #to_sql, and
might be preferable since you'll be able to see more clearly what's
different about the structure of the relation object. Those values are
the definitive source regarding what's been built up by the chain and
what will eventually be generated by to_sql.
Yeah, that does work, but it's not the same as what proxy_options was.
For example, if you have something which previously would have shown you...
['users.admin = ?', true]
...this is now going to be something like this...
"users".admin = 't'
"users".admin = 1
...depending which database driver you're using.
My guess is that's probably fine, most of the time within one
application -- because you are probably using the same DB for
test/dev/production/etc. But, within plugins/gems/modules/etc that
you might want to use across projects, you'd have to pick some DB to
use in the test suite for that plugin, test it like that, and sort of
hope for the best in other DBs.
That's not the end of the world, but I'm just curious if it's still
even possible to access the "original" (ie, not serialized to some
db-specific format) versions of the various scope options?