app/config_objects/per_district.rb
# Users in Bedford type in just their login, others
# use full email addresses.
Users in Bedford type in just their login, others
use full email addresses.
Users in Bedford type in just their login others use full email addresses .
def find_educator_by_login_text(login_text)
    cleaned_login_text = login_text.downcase.strip
    if @district_key == BEDFORD
      Educator.find_by_login_name(cleaned_login_text)
    elsif @district_key == SOMERVILLE
      Educator.find_by_email(cleaned_login_text)
    elsif @district_key == NEW_BEDFORD
      Educator.find_by_email(cleaned_login_text)
    elsif @district_key == DEMO
      Educator.find_by_email(cleaned_login_text)
    else
      raise_not_handled!
    end
  end
def find_educator_by_login_text ( login_text ) cleaned_login_text = login_text . downcase . strip if @district_key == BEDFORD Educator . find_by_login_name ( cleaned_login_text ) elsif @district_key == SOMERVILLE Educator . find_by_email ( cleaned_login_text ) elsif @district_key == NEW_BEDFORD Educator . find_by_email ( cleaned_login_text ) elsif @district_key == DEMO Educator . find_by_email ( cleaned_login_text ) else raise_not_handled! end end
Users in Bedford type in just their login, others
use full email addresses.
Users in Bedford type in just their login others use full email addresses .
login_text
<not_specific>