I am using cancan to define some abilities - and I need to specify the SQL WHERE clause. This sql need to use an alias to the SELECT
eg The default select through the model is “SELECT * from appliances” but I need to make it “SELECT * from appliances ap” so I can use the “ap” alias in the cancan SQL restriction
My question is, can I add this model/table alias somehow so by default all the model access SQL has FROM [TABLENAME] [ALIAS]
I know you can do it dynamically, but I need to set a default if at all possible