diff --git a/app/models/organization.rb b/app/models/organization.rb index 0e845a86f..c35d0591d 100644 --- a/app/models/organization.rb +++ b/app/models/organization.rb @@ -31,7 +31,7 @@ class Organization < ActiveRecord::Base self.allow_teacher.to_i == 1 ? true : false end - def secdomain + def secdomain_name Secdomain.where("sub_type=2 and pid=?", self.id).first.try(:subname) end end diff --git a/app/views/organizations/setting.html.erb b/app/views/organizations/setting.html.erb index abad63656..87d6e4daa 100644 --- a/app/views/organizations/setting.html.erb +++ b/app/views/organizations/setting.html.erb @@ -114,7 +114,7 @@ <% if @organization.secdomain.nil? %> <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> <% else %> - <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> + <%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %> <% end %>