rails-prelaunch-signup
rails-prelaunch-signup copied to clipboard
Bulk invitations sent to already confirmed users
The problem is that the confirmation_token is emptied when the user confirms and the bulk_invite filters on empty confirmation_tokens only:
users = User.where(:confirmation_token => nil).order(:created_at).limit(params[:quantity])
Simply adding :encrypted_password => nil to the where cluase solves the problem:
users = User.where(:confirmation_token => nil, :encrypted_password => nil).order(:created_at).limit(params[:quantity])