From b14aaab5c93075a698ad785a256101c1c76192ab Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 22 Mar 2019 09:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E6=95=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/department.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/department.rb b/app/models/department.rb index 4f383bf4..360302f0 100644 --- a/app/models/department.rb +++ b/app/models/department.rb @@ -4,7 +4,7 @@ class Department < ActiveRecord::Base # apply_add_departments 不能关联删除 tidings表有关联 has_many :apply_add_departments has_many :tidings, as: :container, dependent: :destroy - attr_accessible :name, :school_id, :is_auth, :identifier, :is_delete + attr_accessible :name, :school_id, :is_auth, :identifier, :is_delete, :host_count scope :is_active, lambda{where(:is_delete => false)} scope :is_delete, lambda{where(:is_delete => true)}