radiant-reader-extension 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.6
1
+ 1.3.7
@@ -33,7 +33,11 @@ class Message < ActiveRecord::Base
33
33
  end
34
34
 
35
35
  def undelivered_readers
36
- possible_readers.except(recipients)
36
+ if recipients.any?
37
+ possible_readers.except(recipients)
38
+ else
39
+ recipients
40
+ end
37
41
  end
38
42
 
39
43
  def inactive_readers
data/app/models/reader.rb CHANGED
@@ -43,7 +43,11 @@ class Reader < ActiveRecord::Base
43
43
  named_scope :imported, :conditions => "old_id IS NOT NULL"
44
44
  named_scope :except, lambda { |readers|
45
45
  readers = [readers].flatten
46
- { :conditions => ["NOT readers.id IN (#{readers.map{"?"}.join(',')})", readers.map(&:id)] }
46
+ if readers.any?
47
+ { :conditions => ["NOT readers.id IN (#{readers.map{"?"}.join(',')})", readers.map(&:id)] }
48
+ else
49
+ { }
50
+ end
47
51
  }
48
52
 
49
53
  def forename
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-reader-extension}
8
- s.version = "1.3.6"
8
+ s.version = "1.3.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
12
- s.date = %q{2011-02-09}
12
+ s.date = %q{2011-02-11}
13
13
  s.description = %q{Centralises reader/member/user registration and management tasks for the benefit of other extensions}
14
14
  s.email = %q{will@spanner.org}
15
15
  s.extra_rdoc_files = [
data/reader_extension.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require_dependency 'application_controller'
2
2
 
3
3
  class ReaderExtension < Radiant::Extension
4
- version "1.3.6"
4
+ version "1.3.7"
5
5
  description "Provides reader/member/user registration and management functions"
6
6
  url "http://spanner.org/radiant/reader"
7
7
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-reader-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 6
10
- version: 1.3.6
9
+ - 7
10
+ version: 1.3.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-09 00:00:00 +00:00
18
+ date: 2011-02-11 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency