Files
danbooru/app/models/pool_version.rb
albert 6824e98af3 * Refactored routes some
* Fixed some major bugs with pools and pool versioning
2011-01-21 18:07:34 -05:00

13 lines
309 B
Ruby

class PoolVersion < ActiveRecord::Base
class Error < Exception ; end
validates_presence_of :updater_id, :updater_ip_addr
belongs_to :pool
before_validation :initialize_updater
def initialize_updater
self.updater_id = CurrentUser.id
self.updater_ip_addr = CurrentUser.ip_addr
end
end