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

incorporate feedback using AASM configuration options

This commit is contained in:
HoyaBoya 2016-01-08 13:42:04 -05:00
parent 47826b8a55
commit 9370861cd2
6 changed files with 17 additions and 18 deletions

View file

@ -2,7 +2,7 @@ class CustomAASMBase < AASM::Base
# A custom transiton that we want available across many AASM models.
def count_transitions!
klass.class_eval do
aasm_with CustomAASMBase do
aasm :with_klass => CustomAASMBase do
after_all_transitions :increment_transition_count
end
end
@ -35,7 +35,7 @@ class SimpleCustomExample
include AASM
# Let's build an AASM state machine with our custom class.
aasm_with CustomAASMBase do
aasm :with_klass => CustomAASMBase do
requires_guards!
count_transitions!