app/assets/javascripts/family_gallery/locales.js.coffee in family_gallery-0.0.7 vs app/assets/javascripts/family_gallery/locales.js.coffee in family_gallery-0.0.8
- old
+ new
@@ -1,7 +1,7 @@
$ ->
$("select#locale").change ->
locale_select = $(this)
- $.ajax method: "POST", url: locale_select.data("url"), data: {locale: locale_select.val()}, cache: false, async: false, complete: (data) ->
+ $.ajax method: "POST", url: locale_select.data("url"), data: {locale: locale_select.val()}, cache: false, async: false, dataType: 'json', complete: (data) ->
response = $.parseJSON(data.responseText)
location.reload() if response.success