mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
Added array option for new callbacks
This commit is contained in:
parent
c96f0f38d4
commit
6e16196f20
5 changed files with 9 additions and 5 deletions
6
Rakefile
6
Rakefile
|
@ -53,9 +53,9 @@ else
|
|||
s.extra_rdoc_files = rd.rdoc_files.reject {|fn| fn =~ /\.rb$/}.to_a
|
||||
s.rdoc_options = rd.options
|
||||
|
||||
s.author = 'Scott Barron'
|
||||
s.email = 'scott@elitists.net'
|
||||
s.homepage = 'http://rubyi.st/aasm'
|
||||
s.authors = ['Scott Barron', 'Scott Petersen']
|
||||
s.email = 'petersen@dunedain289.com'
|
||||
s.homepage = 'http://github.com/dunedain289/aasm'
|
||||
end
|
||||
|
||||
package_task = Rake::GemPackageTask.new(spec) do |pkg|
|
||||
|
|
|
@ -2,7 +2,7 @@ PKG_FILES = ["CHANGELOG", "MIT-LICENSE", "Rakefile", "README.rdoc", "TODO", "lib
|
|||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = 'aasm'
|
||||
s.version = "2.1"
|
||||
s.version = "2.1.1"
|
||||
s.summary = 'State machine mixin for Ruby objects'
|
||||
s.description = <<-EOF
|
||||
AASM is a continuation of the acts as state machine rails plugin, built for plain Ruby objects.
|
||||
|
|
|
@ -5,7 +5,7 @@ require File.join(File.dirname(__FILE__), 'persistence')
|
|||
|
||||
module AASM
|
||||
def self.Version
|
||||
'2.0.5'
|
||||
'2.1.1'
|
||||
end
|
||||
|
||||
class InvalidTransition < RuntimeError
|
||||
|
|
|
@ -51,6 +51,8 @@ module AASM
|
|||
record.send(action)
|
||||
when Proc
|
||||
action.call(record)
|
||||
when Array
|
||||
action.each { |a| record.send(a) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ module AASM
|
|||
record.send(action)
|
||||
when Proc
|
||||
action.call(record)
|
||||
when Array
|
||||
action.each { |a| record.send(a) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue