[SOLVED] I've stuck with names scopes

I've created named scope, first, not parametrized using definition in function scopes(). This works fine. Then I tried to parametrize this named scope, therefore I've written a function (see below)

This call in controller finished with error

Line causing this problm looks following.

What I did wrong?

You should "return $this".

Thanks.Now it works. Karma++