activeadmin_associable 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +8 -9
- data/lib/activeadmin_associable/version.rb +1 -1
- data/lib/activeadmin_associable.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55e5014e2752342b1adfa8d630b6b9939b351d27
|
4
|
+
data.tar.gz: 52f3a4f01830b88b888b51c33bd438ebc697f082
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36ce38ddbb9b700bb5f5d82a6faa9e6fdd5bdf46cb82aee4fd14b59789725eca880d0eaf5ab1097d523ebdcc9898d0e01e5ca9573b17e9a5c800da2bd0fb8bf9
|
7
|
+
data.tar.gz: bdc907fd85a94e2d4b8bd10dd0b9f11f6c50ce72d98cd853a28bef2a992fc9202b70b003b83b16257f8faba687f204ba32a7cd469a516ed84b2229603a798d6a
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
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 '
|
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
|
23
|
+
$ gem install activeadmin_associable
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
27
|
This is pretty opinionated right now.
|
28
28
|
|
29
|
-
|
29
|
+
Open an ActiveAdmin Resource (like admin/user.rb) insert `has_many :orders` inside the `#register` block, and insert `association_items`.
|
30
30
|
|
31
|
-
|
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`
|
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/
|
41
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/joshmn/activeadmin_associable.
|
43
42
|
|
@@ -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::
|
13
|
+
::ActiveAdmin::Resource.send(:include, ActiveAdminAssociable::ActiveAdmin::Resource::Associables)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|