rails_admin_nestable 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rails_admin_nestable/nestable.rb +3 -2
- data/lib/rails_admin_nestable/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ODA0NmI1YTJhYjM3NmI4ZTFmOWE0ODliZWU1YTAyYWU5MjFkODQ5Mw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjUwYTc0OTZiNjVmMDVjMTllYjVjNGVmZjA4YmE0ZWMxMTdmZWEyMQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTM2MDFmMTkzZGVlNDExMDJhNjM0Zjk2N2U2OTFlOWM1MWNmODFkOTYxYmNl
|
10
|
+
YmViN2Y5NGUxOTkzNDNjYzk1MjY1NGIwYjRiMDRjNzcyYjk5ODI5N2JhN2Jl
|
11
|
+
MDU3ZDVhNGQyN2RkNWFkMTlmMzc1MTAxYjdlZGE1MWQzNzNlZTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGIxYTVlMjE1M2Y1NTg3ZjdlYzYwZmMzMjc3ZWYyOTQ2NGYzOGYxMmRlNmNl
|
14
|
+
ODBhZjViMGFhODI1ODU1OTM4NmIwMmRiYjZlODUzODMxZWQ3NTk0ZWRhNDcx
|
15
|
+
MDFkNjVhZGI5ZDU1MTI5MWU3OGUwMjMzMGY5ODFkODA4MjY3MDc=
|
@@ -27,6 +27,7 @@ module RailsAdmin
|
|
27
27
|
def update_tree(tree_nodes, parent_node = nil)
|
28
28
|
tree_nodes.each do |key, value|
|
29
29
|
model = @abstract_model.model.find(value['id'])
|
30
|
+
|
30
31
|
if parent_node.present?
|
31
32
|
model.parent = parent_node
|
32
33
|
else
|
@@ -72,11 +73,11 @@ module RailsAdmin
|
|
72
73
|
render text: message
|
73
74
|
else
|
74
75
|
if @nestable_conf.tree?
|
75
|
-
@tree_nodes =
|
76
|
+
@tree_nodes = @abstract_model.model.arrange(order: @nestable_conf.options[:position_field])
|
76
77
|
end
|
77
78
|
|
78
79
|
if @nestable_conf.list?
|
79
|
-
@tree_nodes =
|
80
|
+
@tree_nodes = @abstract_model.modelorder(@nestable_conf.options[:position_field])
|
80
81
|
end
|
81
82
|
|
82
83
|
render action: @action.template_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin_nestable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Dal Ponte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03
|
11
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|