fixed resource_from_invitation_token incompatibility with rails 4.1