activeadmin_polymorphic 0.1.1 → 0.1.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: ea40004a0a7bb3aef319d8e0b0d233b3f3321436
4
- data.tar.gz: a51f08e75f8e5bdc1cfe67d66d9b747668e6859c
3
+ metadata.gz: 8c8e0366d075ede06704fcc278e3205d10f0a400
4
+ data.tar.gz: fa7b251084b188af2fb38088f70273bd54a29f45
5
5
  SHA512:
6
- metadata.gz: 4b3cb0a0b38df959b3dcd5b26b6508a8b2cf7f3d2984c0f98073a41f4f7b88a5de7cc7c61523a3269ab993bb9035d935754aea040a8e8d2a80762a9cc346840f
7
- data.tar.gz: c10e8cfd50e7caae2ded2bf30dfa68b1c8914d170ad7bef1a6503f6682b4512802338f09c52bf3e9fc0358f459671ccc4a3ff8d20dbce6335011bed7921411cd
6
+ metadata.gz: 4ae36fe27857a8d0eb4c7698a2480ba8d44df641a520cbe11f194a3d55d254b8f8d053ded77d0a12e69c67e5da6887111804efa2ddbfd858e71d5deb6e86ad08
7
+ data.tar.gz: fbf23433c88b4091f913372f930b02d21054328fd8e517ac63c6fcad221fe249c9b6bf9d320839bf577a4b3ce5eaab62e00acacd6f229ed8b04164fef8fa2bb9
@@ -160,7 +160,7 @@ window.remoteSubmit = (target, callback)->
160
160
  loadErrors(target)
161
161
  .on 'ajax:success', (event, object, status, response) ->
162
162
  $(target).attr('action', action)
163
- if response.status == 201 # created
163
+ unless $(target).next().find('input:first').val() # create
164
164
  $(target).next().find('input:first').val(object.id)
165
165
  # replace new form with edit form
166
166
  # to update form method to PATCH and form action
@@ -1,3 +1,3 @@
1
1
  module ActiveadminPolymorphic
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_polymorphic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Sergeev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-20 00:00:00.000000000 Z
12
+ date: 2015-04-24 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This gem extends formtastic's form builder to support polymoprhic has
15
15
  many relations in your forms