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:
parent
89622a2413
commit
e121807e30
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue