I want to run a controller query and exclude the current (self) record. I can use this:
Model.where.not(slug: params[:id])
That works fine until you manage to pass the record id.
Is there a cleaner more direct way to do this?
UPDATE
I clarified my example. I want to search where the id OR slug columns are not equal to the params[:id]. This also would have to chain after any normal scope or where query I run.