Skip to content

Commit

Permalink
Instantiate instance variables in logical order
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswoodrich committed Oct 22, 2015
1 parent 23927f1 commit dbaa50d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/aasm/core/transition.rb
Expand Up @@ -8,12 +8,12 @@ class Transition
def initialize(event, opts, &block)
add_options_from_dsl(opts, [:on_transition, :guard, :after], &block) if block

@failures = []
@event = event
@from = opts[:from]
@to = opts[:to]
@guards = Array(opts[:guards]) + Array(opts[:guard]) + Array(opts[:if])
@unless = Array(opts[:unless]) #TODO: This could use a better name
@failures = []

if opts[:on_transition]
warn '[DEPRECATION] :on_transition is deprecated, use :after instead'
Expand Down

0 comments on commit dbaa50d

Please sign in to comment.