removed unneeded method (reading the current state for persisted states is already handled)

This commit is contained in:
Thorsten Böttger 2013-04-21 18:28:17 +02:00
parent 7d43893bbf
commit ede514b115
2 changed files with 0 additions and 36 deletions

View File

@ -76,24 +76,6 @@ module AASM
module InstanceMethods
# Returns the current aasm_state of the object. Respects reload and
# any changes made to the aasm_state field directly
#
# Internally just calls <tt>aasm_read_state</tt>
#
# foo = Foo.find(1)
# foo.aasm_current_state # => :pending
# foo.aasm_state = "opened"
# foo.aasm_current_state # => :opened
# foo.close # => calls aasm_write_state_without_persistence
# foo.aasm_current_state # => :closed
# foo.reload
# foo.aasm_current_state # => :pending
#
def aasm_current_state
@current_state = aasm_read_state
end
private
# Ensures that if the aasm_state column is nil and the record is new

View File

@ -70,24 +70,6 @@ module AASM
module InstanceMethods
# Returns the current aasm_state of the object. Respects reload and
# any changes made to the aasm_state field directly
#
# Internally just calls <tt>aasm_read_state</tt>
#
# foo = Foo.find(1)
# foo.aasm_current_state # => :pending
# foo.aasm_state = "opened"
# foo.aasm_current_state # => :opened
# foo.close # => calls aasm_write_state_without_persistence
# foo.aasm_current_state # => :closed
# foo.reload
# foo.aasm_current_state # => :pending
#
def aasm_current_state
@current_state = aasm_read_state
end
private
# Ensures that if the aasm_state column is nil and the record is new