Skip to content

Commit d3b5e15

Browse files
committed
Adding gitignore for .nvmrc (since I added one). Changed org.rb to accept all mit.edu domains and direct to web.mit.edu for them.
1 parent 0aa549f commit d3b5e15

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,4 @@ storage/
166166
/config/credentials/stage.yaml.enc
167167
/config/credentials/production.key
168168
/config/credentials/production.yaml.enc
169+
.nvmrc

app/models/concerns/dmptool/org.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ def intercept_from_email_domain(email_domain)
6666
matches = ::RegistryOrg.where("home_page LIKE '%www.ucdavis.edu'")
6767
return nil if matches.empty? || matches.first.org_id.nil?
6868

69+
::Org.find_by(id: matches.first.org_id)
70+
71+
when /\A(?:.+\.)?mit\.edu\z/
72+
matches = ::RegistryOrg.where("home_page LIKE '%web.mit.edu'")
73+
return nil if matches.empty? || matches.first.org_id.nil?
74+
6975
::Org.find_by(id: matches.first.org_id)
7076
else
7177
nil

0 commit comments

Comments
 (0)