Added array option for new callbacks

This commit is contained in:
Scott Petersen 2009-02-27 17:41:46 -06:00
parent c96f0f38d4
commit 6e16196f20
5 changed files with 9 additions and 5 deletions

View File

@ -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|

View File

@ -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.

View File

@ -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

View File

@ -51,6 +51,8 @@ module AASM
record.send(action)
when Proc
action.call(record)
when Array
action.each { |a| record.send(a) }
end
end

View File

@ -22,6 +22,8 @@ module AASM
record.send(action)
when Proc
action.call(record)
when Array
action.each { |a| record.send(a) }
end
end