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.
@@ -4,7 +4,7 @@ class ReadMark < ActiveRecord::Base
4
4
 
5
5
  validates_presence_of :user_id, :readable_type
6
6
 
7
- scope_method = respond_to?(:scope) ? :scope : :named_scope
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 = respond_to?(:scope) ? :scope : :named_scope
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
@@ -1,3 +1,3 @@
1
1
  module Unread
2
- VERSION = "0.0.1"
2
+ VERSION = '0.0.2'
3
3
  end
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Georg Ledermann