Is there a way to clear old selects in a .select(\"table.col1, ...\") statement?
Background:
I have a scope that requests accessible items for a given user i
Fortunately you're wrong :D, you can use the #except method to remove some parts of the query made by the relation, so if you want to remove the SELECT part just do :
@items = Item.accessible(@auth.id).except(:select).select("polls.id, polls.title")
Rails 6 introduced a new method called reselect, which does exactly what you need, it replaces previously set select statement.
So now, your query can be written even shorter:
@items = Item.accessible(@auth.id).reselect("polls.id, polls.title")