Sha256: 8edb4fc70f6f48edafb3efd1b659585e7ba9a678f497557c778c2c6b35d800f5
Contents?: true
Size: 374 Bytes
Versions: 19
Compression:
Stored size: 374 Bytes
Contents
require 'purgatory' class Animal < ActiveRecord::Base before_create :set_original_name private def set_original_name self.original_name = name end end class Dog < Animal use_purgatory validates :name, presence: true DEFAULT_PRICE = 100 before_create :set_price private def set_price self.price = DEFAULT_PRICE unless self.price end end
Version data entries
19 entries across 19 versions & 1 rubygems