Skip to content

Commit

Permalink
allow revise! to be used as an association callback
Browse files Browse the repository at this point in the history
bump the version
  • Loading branch information
rich committed May 4, 2009
1 parent fd437ef commit 35022ce
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 5 additions & 5 deletions acts_as_revisable.gemspec
@@ -1,12 +1,12 @@
Gem::Specification.new do |s|
s.version = "1.0.1"
s.authors = ["Rich Cavanaugh", "Stephen Caudill"]
s.summary = "acts_as_revisable enables revision tracking, querying, reverting and branching of ActiveRecord models. Inspired by acts_as_versioned."
s.has_rdoc = true
s.files = ["LICENSE", "README.rdoc", "Rakefile", "spec/associations_spec.rb", "spec/branch_spec.rb", "spec/find_spec.rb", "spec/general_spec.rb", "spec/options_spec.rb", "spec/quoted_columns_spec.rb", "spec/revert_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "lib/acts_as_revisable", "lib/acts_as_revisable/acts", "lib/acts_as_revisable/acts/common.rb", "lib/acts_as_revisable/acts/deletable.rb", "lib/acts_as_revisable/acts/revisable.rb", "lib/acts_as_revisable/acts/revision.rb", "lib/acts_as_revisable/acts/scoped_model.rb", "lib/acts_as_revisable/base.rb", "lib/acts_as_revisable/clone_associations.rb", "lib/acts_as_revisable/gem_spec_options.rb", "lib/acts_as_revisable/options.rb", "lib/acts_as_revisable/quoted_columns.rb", "lib/acts_as_revisable/version.rb", "lib/acts_as_revisable.rb", "generators/revisable_migration", "generators/revisable_migration/revisable_migration_generator.rb", "generators/revisable_migration/templates", "generators/revisable_migration/templates/migration.rb", "rails/init.rb"]
s.name = "acts_as_revisable"
s.files = ["LICENSE", "README.rdoc", "Rakefile", "spec/associations_spec.rb", "spec/branch_spec.rb", "spec/deletable_spec.rb", "spec/find_spec.rb", "spec/general_spec.rb", "spec/options_spec.rb", "spec/quoted_columns_spec.rb", "spec/revert_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "lib/acts_as_revisable", "lib/acts_as_revisable/acts", "lib/acts_as_revisable/acts/common.rb", "lib/acts_as_revisable/acts/deletable.rb", "lib/acts_as_revisable/acts/revisable.rb", "lib/acts_as_revisable/acts/revision.rb", "lib/acts_as_revisable/base.rb", "lib/acts_as_revisable/gem_spec_options.rb", "lib/acts_as_revisable/options.rb", "lib/acts_as_revisable/quoted_columns.rb", "lib/acts_as_revisable/version.rb", "lib/acts_as_revisable.rb", "generators/revisable_migration", "generators/revisable_migration/revisable_migration_generator.rb", "generators/revisable_migration/templates", "generators/revisable_migration/templates/migration.rb", "rails/init.rb"]
s.email = "rich@withoutscope.com"
s.rdoc_options = ["--main", "README.rdoc"]
s.homepage = "http://github.com/rich/acts_as_revisable/tree/master"
s.name = "acts_as_revisable"
s.homepage = "http://github.com/rich/acts_as_revisable"
s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
s.version = "1.0.0"
s.authors = ["Rich Cavanaugh", "Stephen Caudill"]
end
6 changes: 5 additions & 1 deletion lib/acts_as_revisable/acts/revisable.rb
Expand Up @@ -194,11 +194,15 @@ def no_revision? #:nodoc:
# Force an immediate revision whether or
# not any columns have been modified.
#
# The +args+ catch-all argument is not used. It's primarily
# there to allow +revise!+ to be used directly as an association
# callback since association callbacks are passed an argument.
#
# ==== Callbacks
#
# * +before_revise+ is called before the record is revised.
# * +after_revise+ is called after the record is revised.
def revise!
def revise!(*args)
return if in_revision?

begin
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_revisable/version.rb
Expand Up @@ -3,7 +3,7 @@ module ActsAsRevisable
module VERSION #:nodoc:
MAJOR = 1
MINOR = 0
TINY = 0
TINY = 1

STRING = [MAJOR, MINOR, TINY].join('.')
end
Expand Down

0 comments on commit 35022ce

Please sign in to comment.