Sha256: e3b3e499378879e1a23bc085abec11deb8794a04f13424cd7123efcf6f066868

Contents?: true

Size: 280 Bytes

Versions: 16

Compression:

Stored size: 280 Bytes

Contents

require 'purgatory'

class Item < ActiveRecord::Base
  use_purgatory local_attributes: [:dante]

  validates :name, presence: true

  attr_accessor :dante

  after_save :set_original_name
  
  private
  
  def set_original_name
    update_column(:original_name, @dante)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
purgatory-6.0.3 spec/support/item.rb
purgatory-6.0.2 spec/support/item.rb
purgatory-6.0.1 spec/support/item.rb
purgatory-6.0.0 spec/support/item.rb
purgatory-4.0.0 spec/support/item.rb
purgatory-3.1.2 spec/support/item.rb
purgatory-3.1.1 spec/support/item.rb
purgatory-3.1.0 spec/support/item.rb
purgatory-3.0.0 spec/support/item.rb
purgatory-2.14.0 spec/support/item.rb
purgatory-2.13.0 spec/support/item.rb
purgatory-2.12.0 spec/support/item.rb
purgatory-2.11.0 spec/support/item.rb
purgatory-2.10.0 spec/support/item.rb
purgatory-2.9.0 spec/support/item.rb
purgatory-2.8.0 spec/support/item.rb