Error Handling with Ajax in Rails 3

后端 未结 3 715
别那么骄傲
别那么骄傲 2020-12-12 22:58

I\'m creating a simple demo app that allows a user to enter their email address to register their interest in receiving beta access. The app then sends them a confirmation e

3条回答
  •  北海茫月
    2020-12-12 23:41

    I have been facing the same problem a few days ago. I used remote => true option in my form to use Ajax in my Rails 3 application. After that, I have been looking for solution for validating my form fields. After trying a good number of jQuery / Javascript approaches (none of them worked for me though) I came to know about a superb gem called client_side_validations. It is very easy to install by following the instructions on github link (https://github.com/bcardarella/client_side_validations). It works like charm for client side validation of form fields, an awesome gem indeed. Hope this helps with people who are tired of looking for a simple solution for client side validation of model fields after using Ajax in Rails 3 application.

提交回复
热议问题