Closed QWYNG closed 4 years ago
While I think it's unlikely that anyone is relying on getting the namespace array back from the authorize method, technically this is a breaking change: I don't think there's a clear expectation set that we always return the model instance, since the README does say "authorize returns the object passed to it", which I'd argue could mean either "the instance" or "the array".
Not sure how seriously we need to take that 🤷♂
@dgmstuart Thank you for your comments! I'll fix spec! I think that this is a breaking change too. But I think that most users would expect the only record itself to return in this case.
@dgmstuart Thank you for your review. I fixed spec. I'm really grateful as a pundit user for your interaction even with this PR doesn't marge.
I would definitely say this is a bug 🐛
@dgmstuart Thank you for your review! fixed again
@dgmstuart @Linuus I really appreciate both! Thank you for the useful gem again!
Hi, Thank you for the great Gem! This is a proposal and pull request at once. '.authorize' and '#authorize' return passed record now.
But When passing record with a namespace. return array
These methods are expected to return record not namespase array
When authorize override the helpers in AdminController to automatically apply the namespacing, This change will be very useful.
If there is a place to fix, please let me know. best regards.