mongoid-publishable 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,7 +41,8 @@ module Mongoid
41
41
  module InstanceMethods
42
42
  # saves to the db, and publishes if possible
43
43
  def persist_and_publish(publisher = nil)
44
- publish_via(publisher) && save
44
+ published = publish_via(publisher)
45
+ save && published
45
46
  end
46
47
 
47
48
  # saves to the db, and publishes if possible
@@ -85,6 +86,8 @@ module Mongoid
85
86
  end
86
87
  # always return true
87
88
  true
89
+ else
90
+ false
88
91
  end
89
92
  end
90
93
 
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  module Publishable
3
- VERSION = "0.3.2"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-publishable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-16 00:00:00.000000000 Z
12
+ date: 2012-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mongoid
@@ -183,7 +183,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  segments:
185
185
  - 0
186
- hash: -1259240533369859954
186
+ hash: 1934852083788248946
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  none: false
189
189
  requirements:
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  segments:
194
194
  - 0
195
- hash: -1259240533369859954
195
+ hash: 1934852083788248946
196
196
  requirements: []
197
197
  rubyforge_project:
198
198
  rubygems_version: 1.8.24