netzke-basepack 0.12.7 → 0.12.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -2
- data/lib/netzke/basepack/tree.rb +4 -4
- data/lib/netzke/basepack/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
@@ -22,6 +22,6 @@ group :development, :test do
|
|
22
22
|
gem 'web-console', '~> 2.0'
|
23
23
|
# gem 'spring' # troubles...
|
24
24
|
gem 'pry-rails'
|
25
|
-
gem 'netzke-core', github: 'netzke/netzke-core', branch: '
|
26
|
-
gem 'netzke-testing', github: 'netzke/netzke-testing', branch: '
|
25
|
+
gem 'netzke-core', github: 'netzke/netzke-core', branch: '0-12'
|
26
|
+
gem 'netzke-testing', github: 'netzke/netzke-testing', branch: '0-12'
|
27
27
|
end
|
data/lib/netzke/basepack/tree.rb
CHANGED
@@ -100,15 +100,15 @@ module Netzke
|
|
100
100
|
def read(params = {})
|
101
101
|
{}.tap do |res|
|
102
102
|
records = get_records(params)
|
103
|
-
res[
|
104
|
-
res[
|
103
|
+
res["children"] = records.map{|r| node_to_hash(r, final_columns(with_meta: true)).netzke_literalize_keys}
|
104
|
+
res["total"] = count_records(params) if config[:enable_pagination]
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
108
|
def node_to_hash(record, columns)
|
109
109
|
data_adapter.record_to_hash(record, columns).tap do |hash|
|
110
|
-
if is_node_expanded?(record)
|
111
|
-
hash[
|
110
|
+
if is_node_expanded?(record)
|
111
|
+
hash["children"] = record.children.map {|child| node_to_hash(child, columns).netzke_literalize_keys}
|
112
112
|
end
|
113
113
|
end
|
114
114
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-basepack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: netzke-core
|