app/models/dancer.rb
# Checks if the email is not already used by a dance studio
Checks if the email is not already used by a dance studio
Checks if the email is not already used by a dance studio
def email_not_taken
    DanceStudio.all.each do |studio|
      errors.add(:email, 'is taken') if studio.email.downcase == email.downcase
    end
  end
def email_not_taken DanceStudio . all . each do | studio | errors . add ( :email , 'is taken' ) if studio . email . downcase == email . downcase end end
Checks if the email is not already used by a dance studio
Checks if the email is not already used by a dance studio