activeadmin_associable 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f2517a0fcd443db7ab57a6069b8d0dce8c6020c
|
4
|
+
data.tar.gz: f45850b88921b75f966f73859d1a0a21e153d88c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf2033518a86217b5cef04f5d9306c42ae2ce51b5d2286b44de96434c9f852b3bcbb1d55c344b0e5f3d97e374620bc79af9d52187f7c282765d75f2a1c253526
|
7
|
+
data.tar.gz: 7253c74bcb98d6f6d5fe07bf2a2210a77d0d0d4db7bbff6b847b67528269ba57b9ebf4b0f3bec315f78d123ae7b8d3753f2cac055b1c2d97153be46ddc5a257d
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_admin'
|
2
2
|
require 'activeadmin_associable/associable'
|
3
3
|
require 'activeadmin_associable/resource_dsl'
|
4
|
-
require 'activeadmin_associable/active_admin/resource/
|
4
|
+
require 'activeadmin_associable/active_admin/resource/associables'
|
5
5
|
|
6
6
|
require 'activeadmin_associable/version'
|
7
7
|
|
@@ -7,14 +7,14 @@ module ActiveAdminAssociable
|
|
7
7
|
config.associables << ActiveAdminAssociable::Associable.new(name, options)
|
8
8
|
end
|
9
9
|
|
10
|
-
def
|
10
|
+
def associables_menu
|
11
11
|
return nil if config.associables.empty?
|
12
|
-
|
12
|
+
resource_associables = config.associables
|
13
13
|
current_namespace = config.namespace.name
|
14
14
|
config.add_action_item("Associates", :except => [:index, :new]) do
|
15
15
|
dropdown_menu "Associates" do
|
16
|
-
|
17
|
-
item
|
16
|
+
resource_associables.each do |associable|
|
17
|
+
item associable.label, [current_namespace, associable.name, "q[#{resource.model_name.param_key}_id_equals]".to_sym => resource.to_param]
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|