unread 0.0.1 → 0.0.2
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/lib/app/models/read_mark.rb +1 -1
- data/lib/unread/acts_as_readable.rb +1 -1
- data/lib/unread/version.rb +1 -1
- metadata +3 -3
data/lib/app/models/read_mark.rb
CHANGED
@@ -4,7 +4,7 @@ class ReadMark < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
validates_presence_of :user_id, :readable_type
|
6
6
|
|
7
|
-
scope_method =
|
7
|
+
scope_method = ActiveRecord::VERSION::MAJOR < 3 ? :named_scope : :scope
|
8
8
|
|
9
9
|
send scope_method, :global, :conditions => { :readable_id => nil }
|
10
10
|
send scope_method, :single, :conditions => 'readable_id IS NOT NULL'
|
@@ -31,7 +31,7 @@ module Unread
|
|
31
31
|
classes << self
|
32
32
|
ReadMark.readable_classes = classes
|
33
33
|
|
34
|
-
scope_method =
|
34
|
+
scope_method = ActiveRecord::VERSION::MAJOR < 3 ? :named_scope : :scope
|
35
35
|
|
36
36
|
send scope_method, :unread_by, lambda { |user|
|
37
37
|
check_reader
|
data/lib/unread/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unread
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Georg Ledermann
|