thin_man 0.11.2 → 0.11.3

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: 7c3035550e3c17dfa67a9448a702719be0e76acb
4
- data.tar.gz: 355d0bbf12eade487e4976b4a8cdbf7ec3aa290a
3
+ metadata.gz: 1220da7c4d7f921e1b49a0523bedb0ac29327831
4
+ data.tar.gz: a2504fab73b453d1ff2ffe001a2dc2f891369029
5
5
  SHA512:
6
- metadata.gz: 82943692e3248084f9907442cf8c4e5989740a860f8731325cfb67d903fbe37a3f38b7ffab7e1d7031be2260ea08d43fad075f84359ba9ddc6ab743aa67eb035
7
- data.tar.gz: 9ed3fdf82baa79f4d5116786c56e913408f1deec91d3390599fa80049e32fdc65ad98997f68e55ffbc68493ea4f9dbe30a281e4652fdc913ccd96cf28b9b1e9b
6
+ metadata.gz: 5f634db41a4ece9187c2addb1d214a6ef3783b8e1e8cc749dacbe31fe957e9f669b42a857a8b709ac9755663819f036a5b69226b3af6595804e07809954d502a
7
+ data.tar.gz: 3b0e0fa9f33757649136aa95c768b89767658f0625bf0f32049665f4dce13e1378e3118eb58425cef4af898a1d98bb8b66b678198e6838ae9ca3d1094769a4b9
@@ -170,7 +170,18 @@ var initThinMan = function(){
170
170
  },
171
171
  ajaxError: function(jqXHR) {
172
172
  if(jqXHR.status == 409){
173
- this.error_target.html(jqXHR.responseText);
173
+ try{
174
+ var data = JSON.parse(jqXHR.responseText);
175
+ }catch(error){
176
+ var data = jqXHR.responseText;
177
+ }
178
+ if(typeof data === 'string'){
179
+ this.error_target.html(data);
180
+ } else if(typeof data === 'object') {
181
+ if(typeof data.html != 'undefined'){
182
+ this.error_target.html(data.html);
183
+ }
184
+ }
174
185
  }else if(jqXHR.status == 500){
175
186
  alert('There was an error communicating with the server.')
176
187
  }
@@ -1,3 +1,3 @@
1
1
  module ThinMan
2
- VERSION = "0.11.2"
2
+ VERSION = "0.11.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thin_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut, Adam Bialek