Closed swobspace closed 12 years ago
what is its role? i use it in my app, had an exception: RuntimeError in RailsAdmin::MainController#new
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
I've just tested it in a new Rails 3.1.1 application with cancan 1.6.7 and ruby 1.8.7, and didn't have this problem. Are you still having this problem? If you are, would you please offer more details?
@swobspace: I am going to close this issue for now. If you still have this issue, please comment here and it'll be reopened for further discussion/investigation.
i have fixed it,can i use like this :manage, Comment, :user_id => user.id cheerly!
@Gimi @andhapp: I can't test it at the moment, I switched to Rails 3.2 with the patch from jpascal #577 to use rails 3.2 mass assignment stuff., so I'm not on the master branch.
The following definition didn't give the user @usr any rights:
But if I use the following definition
all works as expected. As the wiki page "Defining Abilities" mentioned, both should be equivalent.
I'm using Rails 3.1.1, cancan 1.6.7 and ruby 1.8.7.
wob