Module | Sequel::Plugins::ActiveModel::InstanceMethods
In: | lib/sequel/plugins/active_model.rb

### Methods

after_destroy destroyed? new_record? to_model

### Public Instance methods

after_destroy()

Record that an object was destroyed, for later use by destroyed?

[Source]

        # File lib/sequel/plugins/active_model.rb, line 11
    11:         def after_destroy
    12:           super
    13:           @destroyed = true
    14:         end

destroyed?()

Whether the object was destroyed by destroy. Not true for objects that were deleted.

[Source]

        # File lib/sequel/plugins/active_model.rb, line 18
    18:         def destroyed?
    19:           @destroyed == true
    20:         end

new_record?()

An alias for new?

[Source]

        # File lib/sequel/plugins/active_model.rb, line 23
    23:         def new_record?
    24:           new?
    25:         end

to_model()

With the ActiveModel plugin, Sequel model objects are already compliant, so this returns self.

[Source]

        # File lib/sequel/plugins/active_model.rb, line 29
    29:         def to_model
    30:           self
    31:         end

[Validate]