activerecord-draft_records 0.3.0 → 0.4.0

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -38,7 +38,7 @@ module ActiveRecord
38
38
  end
39
39
  end
40
40
 
41
- # Override valid? to automatically and temporarily set it as a draft for the validation.
41
+ # Override valid? to automatically and temporarily set it as not a draft for the validation.
42
42
  def valid?(context = nil)
43
43
  self.draft, is_draft = false, self.draft
44
44
  super
@@ -51,6 +51,7 @@ module ActiveRecord
51
51
  if self.draft?
52
52
  self.draft = false if self.valid?
53
53
  save(:validate => false)
54
+ !self.draft
54
55
  else
55
56
  save
56
57
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-draft_records
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Rodrigo Kochenburger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-16 00:00:00 -03:00
18
+ date: 2010-10-25 00:00:00 -02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency