rostra 0.1.14 → 0.1.15

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.
@@ -17,7 +17,10 @@ module Rostra
17
17
  private
18
18
 
19
19
  def create_question_following
20
- question.followers << user unless follow_by_email.to_i.zero?
20
+ opted_not_to_follow = follow_by_email.to_i.zero?
21
+ unless opted_not_to_follow || question.followers.exists?(user)
22
+ question.followers << user
23
+ end
21
24
  end
22
25
 
23
26
  end
@@ -39,7 +39,8 @@ module Rostra
39
39
  private
40
40
 
41
41
  def create_question_following
42
- followers << user unless follow_by_email.to_i.zero?
42
+ opted_not_to_follow = follow_by_email.to_i.zero?
43
+ followers << user unless opted_not_to_follow
43
44
  end
44
45
 
45
46
  end
@@ -1,3 +1,3 @@
1
1
  module Rostra
2
- VERSION = "0.1.14"
2
+ VERSION = "0.1.15"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rostra
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.14
5
+ version: 0.1.15
6
6
  platform: ruby
7
7
  authors:
8
8
  - Cory Schires
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-31 00:00:00 Z
13
+ date: 2011-11-02 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails