Module: ClassInheritableAttributes

Included in:
ActionController::Base
Defined in:
lib/action_controller/support/class_inheritable_attributes.rb

Overview

Allows attributes to be shared within an inheritance hierarchy, but where each descendant gets a copy of their parents’ attributes, instead of just a pointer to the same. This means that the child can add elements to, for example, an array without those additions being shared with either their parent, siblings, or children, which is unlike the regular class-level attributes that are shared across the entire hierarchy.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.append_features(base) ⇒ Object

:nodoc:



6
7
8
9
# File 'lib/action_controller/support/class_inheritable_attributes.rb', line 6

def self.append_features(base)
  super
  base.extend(ClassMethods)
end