activeadmin_associable 0.1.4 → 0.1.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bddccecfabd135028473715f0d195eac3e05064
|
4
|
+
data.tar.gz: d9efa914309462229268f1cfa506993e79bf6644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b2a885a4131f3331b19dcbc2afa8e8c16fb2709d93729f2b74618d24dd673258b46105d46fdd2b14945b28dd2f9204566fec3a525bf7521aed19ced1100bfae
|
7
|
+
data.tar.gz: 999fe5b77699baeede8326f65f446590051e0178a30de9ebff4c629f41c9e0fea289a47a3a158a79566fc852bc24968001ff555b433769e394f6baff36d0ef12
|
@@ -7,12 +7,14 @@ module ActiveAdminAssociable
|
|
7
7
|
config.associables << ActiveAdminAssociable::Associable.new(name, options)
|
8
8
|
end
|
9
9
|
|
10
|
-
|
10
|
+
# options does nothing right now
|
11
|
+
def associables_menu(name = "Associables", options = {})
|
12
|
+
options = merge_default_options(options)
|
11
13
|
return nil if config.associables.empty?
|
12
14
|
resource_associables = config.associables
|
13
15
|
current_namespace = config.namespace.name
|
14
|
-
config.add_action_item(
|
15
|
-
dropdown_menu
|
16
|
+
config.add_action_item(name, :except => [:index, :new]) do
|
17
|
+
dropdown_menu name do
|
16
18
|
resource_associables.each do |associable|
|
17
19
|
item associable.label, [current_namespace, associable.name, "q[#{resource.model_name.param_key}_id_equals]".to_sym => resource.to_param]
|
18
20
|
end
|