c2 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,7 +23,8 @@ class C2::Informant::Bucket
23
23
  end
24
24
 
25
25
  def entries_page(page=1,per=10)
26
- entries.offset((page - 1) * per).limit(per).map do |entry|
26
+ # entries.offset((page - 1) * per).limit(per).map do |entry|
27
+ entries.map do |entry|
27
28
  data = elements.enabled.inject({}) do |memo, element|
28
29
  memo[element.name] = entry.send(element.name) if entry.respond_to?(element.name)
29
30
  memo
@@ -16,8 +16,8 @@ class C2::Informant::Locus
16
16
  validate :class_name, :presences => true, :unique => true
17
17
 
18
18
  def label
19
- return self[:label] || '' unless self.class_name
20
- self[:label] ||= self.class_name.pluralize.titleize
19
+ return self[:label_cache] || '' unless self.class_name
20
+ self[:label_cache] ||= self.class_name.pluralize.titleize
21
21
  end
22
22
 
23
23
  def singular_label
@@ -25,8 +25,12 @@ class C2::Informant::Locus
25
25
  end
26
26
 
27
27
  def entry_label
28
- return self[:entry_label] || '' unless self.class_name
29
- self[:entry_label] ||= ([:c2_label, :entry_label, :to_label, :label, :title, :name, :email, :subject].map(&:to_s) & klass.instance_methods).first
28
+ return self[:entry_label_cache] || '' unless self.class_name
29
+ self[:entry_label_cache] ||= ([:c2_label, :entry_label, :to_label, :label, :title, :name, :email, :subject].map(&:to_s) & klass.instance_methods).first
30
+ end
31
+
32
+ def entry_label=(value)
33
+ self[:entry_label_cache] = value
30
34
  end
31
35
 
32
36
  def klass
@@ -11,25 +11,3 @@ var Informant = {
11
11
  });
12
12
  }
13
13
  };
14
-
15
- var Locus = {
16
- label: 'Users',
17
- path: 'users',
18
- scopes: 'ScopeList',
19
- attributes: 'AttributeList'
20
- };
21
-
22
- var Attribute = {
23
- label: 'fu',
24
- template: 'string'
25
- };
26
-
27
- var Scope = {
28
- label: 'Active',
29
- path: 'active',
30
- entries: 'EntryList'
31
- };
32
-
33
- var Entry = {
34
- fu: 'bar',
35
- };
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c2
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - hexorx
@@ -15,11 +15,9 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-12 00:00:00 Z
18
+ date: 2011-10-19 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: rails
22
- prerelease: false
23
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
24
22
  none: false
25
23
  requirements:
@@ -31,11 +29,11 @@ dependencies:
31
29
  - 0
32
30
  - 0
33
31
  version: 3.0.0
34
- type: :runtime
35
32
  requirement: *id001
36
- - !ruby/object:Gem::Dependency
37
- name: mongoid
33
+ type: :runtime
38
34
  prerelease: false
35
+ name: rails
36
+ - !ruby/object:Gem::Dependency
39
37
  version_requirements: &id002 !ruby/object:Gem::Requirement
40
38
  none: false
41
39
  requirements:
@@ -45,11 +43,11 @@ dependencies:
45
43
  segments:
46
44
  - 0
47
45
  version: "0"
48
- type: :runtime
49
46
  requirement: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: bson_ext
47
+ type: :runtime
52
48
  prerelease: false
49
+ name: mongoid
50
+ - !ruby/object:Gem::Dependency
53
51
  version_requirements: &id003 !ruby/object:Gem::Requirement
54
52
  none: false
55
53
  requirements:
@@ -59,11 +57,11 @@ dependencies:
59
57
  segments:
60
58
  - 0
61
59
  version: "0"
62
- type: :runtime
63
60
  requirement: *id003
64
- - !ruby/object:Gem::Dependency
65
- name: haml
61
+ type: :runtime
66
62
  prerelease: false
63
+ name: bson_ext
64
+ - !ruby/object:Gem::Dependency
67
65
  version_requirements: &id004 !ruby/object:Gem::Requirement
68
66
  none: false
69
67
  requirements:
@@ -73,11 +71,11 @@ dependencies:
73
71
  segments:
74
72
  - 0
75
73
  version: "0"
76
- type: :runtime
77
74
  requirement: *id004
78
- - !ruby/object:Gem::Dependency
79
- name: jeweler
75
+ type: :runtime
80
76
  prerelease: false
77
+ name: haml
78
+ - !ruby/object:Gem::Dependency
81
79
  version_requirements: &id005 !ruby/object:Gem::Requirement
82
80
  none: false
83
81
  requirements:
@@ -87,11 +85,11 @@ dependencies:
87
85
  segments:
88
86
  - 0
89
87
  version: "0"
90
- type: :development
91
88
  requirement: *id005
92
- - !ruby/object:Gem::Dependency
93
- name: rspec
89
+ type: :development
94
90
  prerelease: false
91
+ name: jeweler
92
+ - !ruby/object:Gem::Dependency
95
93
  version_requirements: &id006 !ruby/object:Gem::Requirement
96
94
  none: false
97
95
  requirements:
@@ -101,8 +99,10 @@ dependencies:
101
99
  segments:
102
100
  - 0
103
101
  version: "0"
104
- type: :development
105
102
  requirement: *id006
103
+ type: :development
104
+ prerelease: false
105
+ name: rspec
106
106
  description: " C2 aspires to be a simple, drop in, Admin Portal + CMS for apps based on Rails 3 + Mongoid. "
107
107
  email: hexorx@gmail.com
108
108
  executables: []
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  requirements: []
229
229
 
230
230
  rubyforge_project:
231
- rubygems_version: 1.8.6
231
+ rubygems_version: 1.8.10
232
232
  signing_key:
233
233
  specification_version: 3
234
234
  summary: Take control of your Rails 3 and Mongoid based site with the Comand & Control Admin Portal + CMS.