administrate-field-nested_has_many 0.0.1 → 0.0.2

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: b2336e14b58c19c34cd27e3d18f6a64da56f97e0
4
- data.tar.gz: 6638b8ec69dd50bb7bb4c0d0fb1987f314d4d790
3
+ metadata.gz: 2cb29d90820122048ad397c50a5f663381a06975
4
+ data.tar.gz: f0f0d555baa0f4f2dc0e414b509cb415e1bb74c8
5
5
  SHA512:
6
- metadata.gz: d100590240ed07f092bf2a7d0345fb14a4cf22be1474007e48dd23e680567dc9cd32c72e1d06cfd0cfe4cc23f6f27b5b5813af55c44898133e2412c6fbbff4fe
7
- data.tar.gz: 39f13eef2ef5f7017981e7d4bf9dbd0c0b4bd3296cb6d3146e23cc0cdc1bf04538c317c66708b63c8575c61b4a30aa0927f478e77afe921acf2344c17bfe174a
6
+ metadata.gz: a07b34b7debeba156a264e191b0b7d4ab054519ee12fd71d536b3e50fbd68536050f49cc5e7375c802a9f68900195bf6f3167b620bbedcaa035c8c517d7b6ed5
7
+ data.tar.gz: ca68e9204dfcc2e472ec7e1da8d5039b1bcbc11e3d90b80f3dc0fc37c6d2bf48d04d440e343ac6dc1c611776ffb29002e0f2a7e3e75303674058b3369b2b2dd5
data/README.md CHANGED
@@ -7,13 +7,13 @@ A plugin for nested has_many forms in [Administrate].
7
7
  Add to your `Gemfile`:
8
8
 
9
9
  ```ruby
10
- gem "administrate-field-nested_has_many"
10
+ gem "administrate-field-nested_has_many", "~> 0.0.2"
11
11
  ```
12
12
 
13
13
  Run:
14
14
 
15
15
  ```bash
16
- $bundle install
16
+ $ bundle install
17
17
  ```
18
18
 
19
19
  Add to your `FooDashboard`:
@@ -34,4 +34,20 @@ Otherwise, Administrate will try to render a field
34
34
  for the order's `:customer` attribute,
35
35
  which breaks the nested form logic.
36
36
 
37
+ ## Stopgap fix for javascript
38
+
39
+ At the moment, Administrate doesn't automatically load javascripts from plugins.
40
+ To fix this, you need to generate the Administrate javascript file:
41
+
42
+ ```bash
43
+ $ rails g administrate:views:layout
44
+ ```
45
+
46
+ And then add a line to `app/views/admin/application/_javascript.html.erb`
47
+ to input the javascript for this gem:
48
+
49
+ ```
50
+ <%= javascript_include_tag "administrate-field-nested_has_many/application" %>
51
+ ```
52
+
37
53
  [Administrate]: https://github.com/thoughtbot/administrate
@@ -1,11 +1,12 @@
1
1
  require "administrate/field/has_many"
2
2
  require "administrate/page/form"
3
3
  require "rails"
4
+ require "cocoon"
4
5
 
5
6
  module Administrate
6
7
  module Field
7
8
  class NestedHasMany < Administrate::Field::HasMany
8
- VERSION = "0.0.1"
9
+ VERSION = "0.0.2"
9
10
 
10
11
  class Engine < ::Rails::Engine
11
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-nested_has_many
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grayson Wright