Active Record 不觸碰
命名空間
方法
實例公開方法
no_touching?() 連結
如果類別設定 no_touching
,就會傳回 true
,否則為 false
。
Project.no_touching do
Project.first.no_touching? # true
Message.first.no_touching? # false
end
來源:顯示 | 在 GitHub 上
# File activerecord/lib/active_record/no_touching.rb, line 53 def no_touching? NoTouching.applied_to?(self.class) end