Exception: ActiveRecordCompose::UninitializedAttribute

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_record_compose/exceptions.rb

Overview

Occurs when accessing Attributes without initializing it.

Examples:

class Model < ActiveRecordCompose::Model
  def initialize
    # Intentionally not calling super...
  end

  attribute :foo
end
model = Model.new
model.foo = 1  #=> raises ActiveRecordCompose::UninitializedAttribute