Sha256: 3beda18c074a4633ea8f0c943dc7eca849f6b0799d5641744cbac74bdc635a69
Contents?: true
Size: 292 Bytes
Versions: 9
Compression:
Stored size: 292 Bytes
Contents
require 'purgatory' class Widget < ActiveRecord::Base use_purgatory validates :name, presence: true before_create :set_original_name def rename(new_name) self.update_attributes(name: new_name) end private def set_original_name self.original_name = name end end
Version data entries
9 entries across 9 versions & 1 rubygems