I have a nested resource controller called (e.g.) books with the following cancan code:
load_and_authorize_resource :book, :through => :user, :singleton => true
class User < AR
I just switched from 1.5 to 1.6 and the @book instance variable is not set. Instead it loads all books into the @books instance variable. If I switch back to 1.5 it works as expected. Are there any code changes I'm not aware of?
I made a change to load the @books collection when params[:id] isn't present, I think this is what is causing the problem. I'll look into a solution. Thanks for reporting this.
fixing instance loading with :singleton option - closed by 7688025
I just released 1.6.2 with this fix in it.
fixing instance loading with :singleton option - closes #310