Skip to content

Commit

Permalink
remove ivar name from StateMachine#initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Ito Tubasa committed May 22, 2014
1 parent 82ecbc6 commit cabab20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/aasm/aasm.rb
Expand Up @@ -5,7 +5,7 @@ def self.included(base) #:nodoc:

# do not overwrite existing state machines, which could have been created by
# inheritance, see class method inherited
AASM::StateMachine[base] ||= AASM::StateMachine.new('')
AASM::StateMachine[base] ||= AASM::StateMachine.new

AASM::Persistence.load_persistence(base)
super
Expand Down
4 changes: 1 addition & 3 deletions lib/aasm/state_machine.rb
Expand Up @@ -13,9 +13,7 @@ def self.[]=(clazz, machine)
attr_accessor :states, :events, :initial_state, :config
attr_reader :name

# QUESTION: what's the name for? [alto, 2012-11-28]
def initialize(name)
@name = name
def initialize
@initial_state = nil
@states = []
@events = {}
Expand Down

0 comments on commit cabab20

Please sign in to comment.