ruby-paranoia

Rails 5 compatibility between Paranoia and CanCanCan, compromised?

十年热恋 提交于 2019-12-11 05:05:16
问题 I'm having the exact same issue as described on this thread: Rails 5 only_deleted with cancancan #356 I can access a deleted record, like this: @area = Area.only_deleted.find(params[:id]) but if I add load_and_authorize_resource to my controller, it'll attempt to run the query like this: @area = Area.find(params[:id]) which will result in error since it won't find a record with that id on a collection where deleted_at isn't null (not deleted records, the purpose of the Paranoia gem). If I