activeadmin_associable 0.1.4 → 0.1.5

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: 20176dd639241cba37f680f03b1f47bca1699d1f
4
- data.tar.gz: 85664f6e5332e9e42396ef8be7a596acef183796
3
+ metadata.gz: 0bddccecfabd135028473715f0d195eac3e05064
4
+ data.tar.gz: d9efa914309462229268f1cfa506993e79bf6644
5
5
  SHA512:
6
- metadata.gz: 4125e2d2e02b6a1f7ea39e151f5eb8fca3d4027acde3bb7ab50f244f151658700ff306d060e2f1fb4adf935d7fcbe2e3d37be880a09c7e6e0b763d76be91a178
7
- data.tar.gz: dac11e862424fdf81d6a2493fd84702512c65a463623a9e42ae2804a40cfcf6228252f25445e314e19cf0661c413720115fa0d624912025c905753276f0b19f4
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
- def associables_menu
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("Associates", :except => [:index, :new]) do
15
- dropdown_menu "Associates" do
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
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminAssociable
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_associable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody