activeadmin_polymorphic 0.2.0 → 0.2.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: 1c4fce0fe59e3a10c877f1e40619e8a3964a19f7
4
- data.tar.gz: fcd7e792b07b0ff7f89aaa9f96f05def9a04b505
3
+ metadata.gz: 38734d64a3a49cacac95b52d252669e4a6f8da48
4
+ data.tar.gz: 50322538d61f978ac685e9d7fd2ce159d2bb17f7
5
5
  SHA512:
6
- metadata.gz: 6a5cdd32891e76588e5cdc4c624270ce751e3073262b4f4a5acf3aa34fd4abf2eeff5fdbefea9b29555c46c9174c90c7dc159156e61bcc59c2ddf91de4ce2a56
7
- data.tar.gz: 873e4d2c73b2ce01ba1ced5ab8ebad3fa91f3691c603faa0e38effebe1484c33850631e5953154660cc325578db6ae5475d914d9f527f463005eb04b63f45d01
6
+ metadata.gz: 1fb80e97f99a5665121eb268847265925514bda9b694cb7756d7d3a34f9e9038c6545990d2f29e800a9425215c6c8f9b3f418746f09b825cc6dada64ca19c41a
7
+ data.tar.gz: c3d4a08f4d83a8e0332338f3e48ca59450588524569d10930a5ca59818a943798fb28bc1aba8e15184ea1069f20114e4f8226ac3c6df19eddb4e1788a20164af
@@ -115,16 +115,19 @@ recompute_positions = (parent)->
115
115
  window.extractAndInsertForm = (url, target)->
116
116
  target = $ target
117
117
 
118
- $.get url, (data)->
119
- elements = $(data)
120
- form = $('#main_content form', elements).first()
121
- $(form).find('.actions').remove()
122
- $(form).on 'submit', -> return false
123
-
124
- target.prepend form
125
-
126
- container = $(target).closest '.polymorphic_has_many_container'
127
- container.trigger "polymorphic_has_many_form:inserted", [form]
118
+ $.ajax url,
119
+ headers:
120
+ Accept: 'text/html'
121
+ success: (data)->
122
+ elements = $(data)
123
+ form = $('#main_content form', elements).first()
124
+ $(form).find('.actions').remove()
125
+ $(form).on 'submit', -> return false
126
+
127
+ target.prepend form
128
+
129
+ container = $(target).closest '.polymorphic_has_many_container'
130
+ container.trigger "polymorphic_has_many_form:inserted", [form]
128
131
 
129
132
  window.loadErrors = (target) ->
130
133
  $(target).off('ajax:success') # unbind successfull action for json form
@@ -1,3 +1,3 @@
1
1
  module ActiveadminPolymorphic
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.2.0
4
+ version: 0.2.1
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-28 00:00:00.000000000 Z
12
+ date: 2015-09-22 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
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  version: '0'
75
75
  requirements: []
76
76
  rubyforge_project:
77
- rubygems_version: 2.4.5
77
+ rubygems_version: 2.2.2
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: HasMany polymoprhic support for active admin.