varvet / pundit

Minimal authorization through OO design and pure Ruby classes
MIT License
8.29k stars 632 forks source link

authorize returns true instead of the object #534

Closed chris-roerig closed 6 years ago

chris-roerig commented 6 years ago

Hi. According to the docs

authorize returns the object passed to it

In practice it's returning true for me. Is this the desired behavior?

Linuus commented 6 years ago

You are probably using version 1.1 from rubygems? That version didn’t include that change. You need to use 2.0.0.beta1

chris-roerig commented 6 years ago

Is 2.0.0.beta1 a branch someplace?

Linuus commented 6 years ago

It’s the same as master currently. There is also a tag for it. It’s also on rubygems :)

https://rubygems.org/gems/pundit/versions/2.0.0.beta1

Please check the changelog for changes. Since this is a major update it includes breaking changes.