1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

remove deprecation warning while testing (no matter which ActiveRecord version you use)

This commit is contained in:
Thorsten Böttger 2012-02-22 23:26:33 +13:00
parent 89622a2413
commit e121807e30

View file

@ -60,7 +60,11 @@ class DerivateNewDsl < SimpleNewDsl
end
class Thief < ActiveRecord::Base
set_table_name "thieves"
if ActiveRecord::VERSION::MAJOR >= 3
self.table_name = 'thieves'
else
set_table_name "thieves"
end
include AASM
aasm_initial_state Proc.new { |thief| thief.skilled ? :rich : :jailed }
aasm_state :rich