Anyway to ignore the default scope in some situations?

Hi everyone,

I’ve implemented a soft delete behavior where I have a column ‘deleted’ which is either 0 or 1.

My Model contains a default scope like this




	public function defaultScope()

	{

		return array('condition'=>"deleted = 0");

	}



In an admin interface I’d like to view all records that have been deleted. Is there any way to do it?

The only way I can think of is to extend the original model overwriting the defaultScope method with deleted =1.

Is there another way?

Couldn’t you just set another scope (even “dummy”) before querying?

wouldn’t the default scope be applied anyway?