golden-objects 0.3.1 → 0.3.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03a0e2d5404ea6f9b73f2a0db92ddbfe27c62ccd688a1884aeb5f941d9fc9588
|
4
|
+
data.tar.gz: 4fe38f49e3602b2a5a7b02e7cea73268262ef2885c123842b58b00d877b58d00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18fd434fedd9b088637bf830523d172ca17c42e65f68924e00aaec51fa233a1ade7c68c7b046f361f0ee483643e627d5be93f47936e60ec957839aecee9d5f92
|
7
|
+
data.tar.gz: '049714cb2f8fbc338d468d4144dabdcbf2504a12651995f9b535d4062eafb6512c5945b0bf41b74647e4a6ce19e736f293001c849b1603bc3ea56bcc1c747e4f'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Logs
|
2
2
|
|
3
|
+
## v0.3.2
|
4
|
+
|
5
|
+
* Add `Golden::QueryRecordPresenter` and `Golden::QueryFormPresenter` as basic presenters.
|
6
|
+
|
3
7
|
## v0.3.1
|
4
8
|
|
5
9
|
* The argement `presenter_class` of `Golden::QueryResultPresenter.collect` should be string instead of class.
|
@@ -21,8 +25,8 @@
|
|
21
25
|
|
22
26
|
## v0.2.0
|
23
27
|
|
24
|
-
* Add golden form builder and helper
|
25
|
-
* Golden query context support pluck
|
28
|
+
* Add golden form builder and helper.
|
29
|
+
* Golden query context support pluck.
|
26
30
|
|
27
31
|
## v0.1.0
|
28
32
|
|
@@ -26,7 +26,7 @@ module Golden
|
|
26
26
|
define_method :record_presenter_class do
|
27
27
|
return record_presenter.to_s.constantize if record_presenter.present?
|
28
28
|
|
29
|
-
"#{self.class.parent.name}::
|
29
|
+
"#{self.class.parent.name}::QueryRecordPresenter".constantize
|
30
30
|
end
|
31
31
|
end
|
32
32
|
# rubocop:enable Naming/PredicateName
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Golden
|
4
|
+
class QueryRecordPresenter < Golden::ApplicationPresenter
|
5
|
+
class << self
|
6
|
+
def collect(records)
|
7
|
+
::Golden::QueryResultPresenter.collect(records, name)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def initialize(record, accessors = {})
|
12
|
+
super(accessors)
|
13
|
+
@record = record
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: golden-objects
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tse-Ching Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -101,6 +101,8 @@ files:
|
|
101
101
|
- lib/golden/objects/query/query_context.rb
|
102
102
|
- lib/golden/objects/query/query_form.rb
|
103
103
|
- lib/golden/objects/query/query_form_operator.rb
|
104
|
+
- lib/golden/objects/query/query_form_presenter.rb
|
105
|
+
- lib/golden/objects/query/query_record_presenter.rb
|
104
106
|
- lib/golden/objects/query/query_result_presenter.rb
|
105
107
|
- lib/golden/objects/version.rb
|
106
108
|
homepage: https://github.com/goldenio/golden-objects
|