I'm using:
gem 'rails', '3.2.2'
gem 'devise', '~> 2.0.0'
gem 'devise_invitable', '~> 1.0.0'
The devise_invitable plugin allows my members to invite other members.
My controller looks like it uses the class method invite!:
def create
#params[resource_name] ==> {"email" => "[email protected]"}
# current_inviter ==> same as current_artist
# resource_class Artist
self.resource = resource_class.invite!(params[resource_name], current_inviter)
.....
I would like to be notified everytime an invitation is made via an email bcc, but I don't know where to inject this. I tried adding bcc to the hash that is passed to invite! method but that seems to be only to set the model's attributes so I get error:
b = Artist.invite!({:email => '[email protected]', :name=>'test name', :bcc => '[email protected]'},t)
ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes: bcc
How can I get a secret copy of every invitation that is sent out?