acts_as_revisionable 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/acts_as_revisionable.gemspec +2 -2
- data/lib/acts_as_revisionable/revision_record.rb +2 -2
- data/spec/full_spec.rb +2 -1
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.6
|
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_revisionable}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Durand"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-02-08}
|
13
13
|
s.description = %q{ActiveRecord extension that provides revision support so that history can be tracked and changes can be reverted. Emphasis for this plugin versus similar ones is including associations, saving on storage, and extensibility of the model.}
|
14
14
|
s.email = %q{brian@embellishedvisions.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -71,8 +71,8 @@ module ActsAsRevisionable
|
|
71
71
|
sti_type = self.revision_attributes[restore_class.inheritance_column]
|
72
72
|
if sti_type
|
73
73
|
begin
|
74
|
-
|
75
|
-
sti_type =
|
74
|
+
if !restore_class.store_full_sti_class && !sti_type.start_with?("::")
|
75
|
+
sti_type = "#{restore_class.parent.name}::#{sti_type}"
|
76
76
|
end
|
77
77
|
restore_class = sti_type.constantize
|
78
78
|
rescue NameError => e
|
data/spec/full_spec.rb
CHANGED
@@ -85,6 +85,7 @@ describe "ActsAsRevisionable Full Test" do
|
|
85
85
|
|
86
86
|
set_inheritance_column :type_name
|
87
87
|
acts_as_revisionable :dependent => :keep, :encoding => :xml
|
88
|
+
self.store_full_sti_class = false
|
88
89
|
end
|
89
90
|
|
90
91
|
class RevisionableSubclassModel < RevisionableNamespaceModel
|
@@ -402,7 +403,7 @@ describe "ActsAsRevisionable Full Test" do
|
|
402
403
|
restored.class.should == ActsAsRevisionable::RevisionableSubclassModel
|
403
404
|
restored.name.should == 'test'
|
404
405
|
restored.id.should == model.id
|
405
|
-
restored.type_name.should == '
|
406
|
+
restored.type_name.should == 'RevisionableSubclassModel'
|
406
407
|
end
|
407
408
|
|
408
409
|
it "should destroy revisions if :dependent => :keep was not specified" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_revisionable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 6
|
10
|
+
version: 1.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Durand
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-02-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|