activeadmin_associable 0.1.0 → 0.1.1

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: d4f40c84220f97583d395b4c7b30865bb15abf9b
4
- data.tar.gz: ba33637f6572d3e75777e773bb28d1ccec2e025c
3
+ metadata.gz: 55e5014e2752342b1adfa8d630b6b9939b351d27
4
+ data.tar.gz: 52f3a4f01830b88b888b51c33bd438ebc697f082
5
5
  SHA512:
6
- metadata.gz: 42811282482b51da83c73d024c6080d836883ae0dd4c2b33450c81a68ab72e7ae8e607a403c3a18954f4a722e6b34a8de1d5fe29a111b50acd73a0f1f6d8bd0d
7
- data.tar.gz: ada2e462f4d1296baa0534174a483422344c508fffb7cfc77f8b6ecef676701820fad23b04510edbf9a1e705708d9f56f821ad937ac0c4f8024f71952fd1d0df
6
+ metadata.gz: 36ce38ddbb9b700bb5f5d82a6faa9e6fdd5bdf46cb82aee4fd14b59789725eca880d0eaf5ab1097d523ebdcc9898d0e01e5ca9573b17e9a5c800da2bd0fb8bf9
7
+ data.tar.gz: bdc907fd85a94e2d4b8bd10dd0b9f11f6c50ce72d98cd853a28bef2a992fc9202b70b003b83b16257f8faba687f204ba32a7cd469a516ed84b2229603a798d6a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ActiveAdminAssociations
1
+ # ActiveAdminAssociable
2
2
 
3
3
  A dropdown menu for your ActiveRecord relations between ActiveAdmin Resources.
4
4
 
@@ -11,7 +11,7 @@ Only builds properly for `has_many` associations right now because I assume you'
11
11
  Add this line to your application's Gemfile:
12
12
 
13
13
  ```ruby
14
- gem 'active_admin_associations'
14
+ gem 'activeadmin_associable'
15
15
  ```
16
16
 
17
17
  And then execute:
@@ -20,24 +20,23 @@ And then execute:
20
20
 
21
21
  Or install it yourself as:
22
22
 
23
- $ gem install active_admin_associations
23
+ $ gem install activeadmin_associable
24
24
 
25
25
  ## Usage
26
26
 
27
27
  This is pretty opinionated right now.
28
28
 
29
- In a resource file in an ActiveAdmin namespace, open `user.rb` and add `has_many :orders` inside the `register` block. This will create an `action_item` for the show/edit actions that renders a dropdown menu with a link to the Orders associated with the current resource ID.
29
+ Open an ActiveAdmin Resource (like admin/user.rb) insert `has_many :orders` inside the `#register` block, and insert `association_items`.
30
30
 
31
- Add `association_items` anywhere on the resource page to display the dropdown.
31
+ This will create an `action_item` for the show/edit actions that renders a dropdown menu with a link to the Orders associated with the current resource ID.
32
32
 
33
- This does not do anything else. It does not mean to do anything else. It doesn't hit ActiveRecord or check to see that your `Order` resource actually exists inside ActiveAdmin. It simply builds a link to the assumed Ransack query URL.
33
+ This does not do anything else. It does not mean to do anything else. It doesn't hit ActiveRecord or check to see that your `Order` Resource actually exists inside ActiveAdmin. It simply builds a link to the assumed Ransack query URL.
34
34
 
35
35
  ### Options
36
36
 
37
- Use `as` to change the label. Defaults to `class.model_name.plural`
38
-
37
+ Use `as` to change the label. Defaults to `class.model_name.plural.titleize`
39
38
 
40
39
  ## Contributing
41
40
 
42
- Bug reports and pull requests are welcome on GitHub at https://github.com/joshmn/active_admin_associations.
41
+ Bug reports and pull requests are welcome on GitHub at https://github.com/joshmn/activeadmin_associable.
43
42
 
@@ -1,3 +1,3 @@
1
1
  module ActiveAdminAssociable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,7 +10,7 @@ module ActiveAdminAssociable
10
10
  class Engine < ::Rails::Engine
11
11
  config.after_initialize do
12
12
  ::ActiveAdmin::ResourceDSL.send(:include, ActiveAdminAssociable::ResourceDSL)
13
- ::ActiveAdmin::Resource.send(:include, ActiveAdminAssociable::ActiveAdmin::Resource::Associations)
13
+ ::ActiveAdmin::Resource.send(:include, ActiveAdminAssociable::ActiveAdmin::Resource::Associables)
14
14
  end
15
15
  end
16
16
  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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Brody