Module: ActiveRecord::NoTouching
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveSupport::Concern
|
|
Defined in: | activerecord/lib/active_record/no_touching.rb |
Class Method Summary
::ActiveSupport::Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
Instance Attribute Summary
-
#no_touching? ⇒ Boolean
readonly
Returns
true
if the class hasno_touching
set,false
otherwise.
Instance Attribute Details
#no_touching? ⇒ Boolean
(readonly)
Returns true
if the class has no_touching
set, false
otherwise.
Project.no_touching do
Project.first.no_touching? # true
Message.first.no_touching? # false
end
# File 'activerecord/lib/active_record/no_touching.rb', line 53
def no_touching? NoTouching.applied_to?(self.class) end