Sha256: 4a7027638276f28aedae74a88730038bcd571a84bc159ad8e9dcb1d214a79666

Contents?: true

Size: 370 Bytes

Versions: 2

Compression:

Stored size: 370 Bytes

Contents

class CallbackArchival4 < ActiveRecord::Base
  acts_as_archival

  attr_accessor :set_this_value,
                :pass_callback

  before_archive :set_value,
                 :conditional_callback_passer

  private def set_value
    self.settable_field = set_this_value
  end

  private def conditional_callback_passer
    pass_callback || pass_callback.nil?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_archival-1.1.1 test/fixtures/callback_archival_4.rb
acts_as_archival-1.1.0 test/fixtures/callback_archival_4.rb