Skip to content

Commit

Permalink
Fix for 404 statuses from client_side_validations; small usage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KODerFunk committed May 29, 2013
1 parent c8a468d commit 7798b99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/assets/javascripts/ultimate/flash.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*
* * * USE INSTEAD
* @usage
* window.flash = new Ultimate.Plugin.Flash[(Object options = {})]
* window.flash = new Ultimate.Plugins.Flash[(Object options = {})]
* flash.notice String text
###

Expand Down Expand Up @@ -253,7 +253,8 @@ class Ultimate.Plugins.Flash extends Ultimate.__FlashClass
# catch 'error' object and call alert() method
return @alert(parsedJSON['error']) if parsedJSON['error']
# may be parsedJSON is form errors
if @detectFormErrors is true
# about 404: https://github.com/bcardarella/client_side_validations/issues/297
if @detectFormErrors is true and jqXHR.status isnt 404
# show message about form with errors
return @alert(@t('formFieldsError'))
else if _.isFunction(@detectFormErrors)
Expand Down

0 comments on commit 7798b99

Please sign in to comment.