Skip to content
Browse files

do

  • Loading branch information...
1 parent c619c4e commit c6ab854f9ff59a15e04c24e28be73cf23e484b2c @bogdan committed Apr 27, 2013
Showing with 27 additions and 9 deletions.
  1. +0 −9 404.html
  2. +27 −0 _posts/2013-04-30-rails-ajax-validation-form-submit-javascript.markdown
View
9 404.html
@@ -2,15 +2,6 @@
layout: default
title: Not Found
---
-<script>
-
-var path = window.location.pathname;
-if (path.substr(0, 3) == "/x/") {
- var short_code = path.substr(3, path.length-1)
- if (short_code == "statused-worker")
- window.location = "https://gist.github.com/bogdan/1222167"
-}
-</script>
<div class="not-found">
<h2>Not Found</h2>
View
27 _posts/2013-04-30-rails-ajax-validation-form-submit-javascript.markdown
@@ -0,0 +1,27 @@
+---
+layout: post
+title: Support validation through ajax in Rails 4.x
+published: false
+tags:
+- rails
+- contribution
+- javascript
+- ajax
+- validation
+---
+
+I have a constant feeling that in a modern web every web form should be submitted with AJAX not the old retro way with POST request. This is better for numerous reasons.
+
+At first, AJAX is faster than regular request.
+At second, it doesn't require a work to redraw the page with it's previous state if validation fails.
+At the end, it gives better user experience
+
+Currently I am trying to make rails app support this out of the box.
+And here is first small step to this goal:
+
+[This patch](https://github.com/rails/rails/pull/8638) allows a complete validation though ajax using active model validators.
+This is a [live demo](http://rails-ajax-validation.herokuapp.com/developers/new) of that it allows to do.
+If you feel especially interested in this feature, say your +1 here or on github.
+
+
+

0 comments on commit c6ab854

Please sign in to comment.
Something went wrong with that request. Please try again.