revisions 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -87,6 +87,12 @@ There are a few things on the to-do list, among them:
87
87
  * Revisions assumes your model uses a standard rails Table Name (ie Response => Responses)
88
88
  * Revisions requires the status and revision_of columns (for now)
89
89
 
90
+ == RELEASE NOTES
91
+
92
+ 0.1.1
93
+ - Added updated_at to unrevised attributes to fix a bug in pending_revisions? on a revision.
94
+
95
+
90
96
 
91
97
  ==Author
92
98
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/revisions.rb CHANGED
@@ -14,7 +14,7 @@ module Revisions
14
14
  include InstanceMethods
15
15
 
16
16
  self.unrevised_attributes = opts[:ignore] || []
17
- self.unrevised_attributes.concat ['revision_of', 'status', 'created_at']
17
+ self.unrevised_attributes.concat ['revision_of', 'status', 'created_at', 'updated_at', 'id']
18
18
  end
19
19
 
20
20
  end
@@ -68,7 +68,7 @@ module Revisions
68
68
  def apply_revision(revision=nil)
69
69
  revision = latest_revision if revision.nil?
70
70
  unless revision.nil?
71
- revised_attributes = revision.attributes.reject {|k,v| self.unrevised_attributes.include?(k) || k == 'id'}
71
+ revised_attributes = revision.attributes.reject {|k,v| self.unrevised_attributes.include?(k)}
72
72
  self.attributes=revised_attributes
73
73
  return true
74
74
  end
data/revisions.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{revisions}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Hamman"]
12
- s.date = %q{2010-05-20}
12
+ s.date = %q{2010-06-24}
13
13
  s.description = %q{Save and apply revisions to a model, while keeping track of old revisiions}
14
14
  s.email = %q{hamman@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brian Hamman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-20 00:00:00 -04:00
17
+ date: 2010-06-24 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency