Skip to content

Commit

Permalink
instantiate_with_revisable was improperly allowing revision instances…
Browse files Browse the repository at this point in the history
… to make it through when they should have been revisable instances.
  • Loading branch information
Rich Cavanaugh committed Jun 3, 2008
1 parent bbeb947 commit 6edc4b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion acts_as_revisable.gemspec
Expand Up @@ -2,7 +2,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--main", "README.rdoc"]
s.summary = "acts_as_revisable enables revision tracking, querying, reverting and branching of ActiveRecord models. Inspired by acts_as_versioned."
s.name = "acts_as_revisable"
s.version = "0.8.6"
s.version = "0.8.7"
s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
s.email = "cavanaugh@fatjam.com"
s.has_rdoc = true
Expand Down
2 changes: 1 addition & 1 deletion lib/acts_as_revisable/acts/common.rb
Expand Up @@ -172,7 +172,7 @@ def instantiate_with_revisable(record) #:nodoc:
is_current = columns_hash["revisable_is_current"].type_cast(
record["revisable_is_current"])

if (is_current && self == self.revisable_class) || (is_current && self == self.revision_class)
if (is_current && self == self.revisable_class) || (!is_current && self == self.revision_class)
return instantiate_without_revisable(record)
end

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 = 0
MINOR = 8
TINY = 6
TINY = 7

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

0 comments on commit 6edc4b7

Please sign in to comment.