From 13cc5ceaa69501f1e557bda3e596ab63d938b10a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 17 May 2016 09:02:17 +0800 Subject: [PATCH] =?UTF-8?q?model=E4=B8=AD=E6=B7=BB=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=BA=8C=E7=BA=A7=E5=9F=9F=E5=90=8D=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/organization.rb | 2 +- app/views/organizations/setting.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 %>