scambra/devise_invitable — Issue #146: Allow updating of attributes with roles
Author: feralbob
Created: 2011-11-26 03:02:23+00:00
State: open

I'm using the role mass-assignment security protection features in Rails 3.1 - so I'm allowing a role attribute to be set if the role is :role_manager

eg in my model

attr_accessible :email, :password, :password_confirmation, :remember_me
attr_accessible :email, :password, :password_confirmation, :remember_me, :roles, :as => :role_manager

I'd like to allow admins to invite and set the roles at the same time. However invite! has no option to pass on the role.