radiant-reader_group-extension 1.2.1 → 1.2.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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
data/lib/grouped_model.rb CHANGED
@@ -34,7 +34,11 @@ module GroupedModel
34
34
  :having => "group_count = 0",
35
35
  :group => column_names.map { |n| self.table_name + '.' + n }.join(','), # postgres requires that we group by all selected (but not aggregated) columns
36
36
  :readonly => false
37
- }
37
+ } do
38
+ def count
39
+ length
40
+ end
41
+ end
38
42
 
39
43
  named_scope :grouped, {
40
44
  :select => "#{self.table_name}.*, count(pp.id) as group_count",
@@ -42,7 +46,11 @@ module GroupedModel
42
46
  :having => "group_count > 0",
43
47
  :group => column_names.map { |n| self.table_name + '.' + n }.join(','),
44
48
  :readonly => false
45
- }
49
+ } do
50
+ def count
51
+ length
52
+ end
53
+ end
46
54
 
47
55
  named_scope :for_group, lambda { |group|
48
56
  {
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{radiant-reader_group-extension}
8
- s.version = "1.2.1"
8
+ s.version = "1.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["spanner"]
@@ -10,7 +10,7 @@ module ReaderGroup
10
10
  end
11
11
 
12
12
  class ReaderGroupExtension < Radiant::Extension
13
- version "1.2.1"
13
+ version "1.2.2"
14
14
  description "Page (and other) access control for site readers and groups"
15
15
  url "http://spanner.org/radiant/reader_group"
16
16
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-reader_group-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - spanner