Just rebased against master to ensure pull request #657 merges cleanly.
Support for Rails 3.1 role based mass assignment
Rename :assignment option to :assign_as
Fix for pull request #657.
Sorry if this isn't the place to ask, but how would it be possible to pass the role for a current user (i'm using devise in this example). For example this works fine:
load_and_authorize_resource :assign_as => :administrator
But this does not (as current_admin isn't available outside a controller action it seems.
load_and_authorize_resource :assign_as => current_admin.role
Let's discuss this for CanCan 2 since 1.x is more for bug fixes at this point. In 2.0 one can define permissions for certain attributes which I'm still determining how this will interact with attr_accessible.
Also @mariovisic brings up a good point about assigning the role dynamically based on the current user.
I'd really love to see this merged into CanCan, but can understand if support for this feature will disappear once strong_parameters becomes the norm.
Dear submitter, Since cancan/raynB hasn't been active for more than 6 months and no body else then ryam himself has commit permissions the cancan project is on a stand still.
Since cancan has several issues including missing support for rails 4 cancan is moving forward to cancancan. More details on: #994
If your feel that your pull request or bug is still applicable (and hasn't been merged in to cancan) it would be really appreciated if you would resubmit it to cancancan (https://github.com/cancancommunity/cancancan)
We hope to see you on the other side!