mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
refactor authentication method
This commit is contained in:
parent
7d387dbe0e
commit
308742f619
1 changed files with 5 additions and 2 deletions
|
|
@ -10,8 +10,11 @@ class SqmApplicationController < ApplicationController
|
|||
private
|
||||
|
||||
def authenticate_district
|
||||
name = @district.name.split(" ").first.downcase
|
||||
authenticate(name, "#{name}!")
|
||||
authenticate(district_name, "#{district_name}!")
|
||||
end
|
||||
|
||||
def district_name
|
||||
@district_name ||= @district.name.split(" ").first.downcase
|
||||
end
|
||||
|
||||
def set_schools_and_districts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue