Class: Guise::SourceCallback Private

Inherits:
Callback show all
Defined in:
lib/guise/callbacks.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Methods inherited from Callback

#initialize

Constructor Details

This class inherits a constructor from Guise::Callback

Instance Method Details

#after_initialize(record) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



12
13
14
15
16
# File 'lib/guise/callbacks.rb', line 12

def after_initialize(record)
  if record.new_record?
    record.guises.build(@attribute => @guise)
  end
end