devise_invitable : allowing non-devise models to set and send invitations
I'm configuring devise_invitable and I need to have a model that is not a devise model set and send invitations.
The readme has instructions for setting this 开发者_JS百科by devise models(e.g. only devise Admin model), but not an external non-devise model(e.g. I have an specific Inviter user but it isn't a devise model).
I'm curious if anyone has done this or what advice you would offer.
Works through setting this is the Application controller:
protected
def authenticate_inviter!
end
Not entirely sure of the security ramifications in depth, but it works for now.
精彩评论