Module: Trailblazer::Declarative::Schema::State::Inherited

Defined in:
lib/trailblazer/declarative/schema.rb

Instance Method Summary collapse

Instance Method Details

#inherited(subclass) ⇒ Object

DISCUSS: this is not a class method and will not be executed when extended the first time.



57
58
59
60
61
62
63
# File 'lib/trailblazer/declarative/schema.rb', line 57

def inherited(subclass)
  super

  inherited_fields = state.copy_fields(subclass: subclass)

  subclass.initialize_state!(inherited_fields) # TODO: discuss, should this be done "in" the subclass rather than here?
end