123456789_123456789_123456789_123456789_123456789_

Module: ActiveRecord::NoTouching

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Base, ActiveRecord::InternalMetadata, ActiveRecord::SchemaMigration
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
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

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
[ GitHub ]

  
# File 'activerecord/lib/active_record/no_touching.rb', line 53

def no_touching?
  NoTouching.applied_to?(self.class)
end