You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository is for Rails 3. For Rails 2 compatibility, try [Rails 2 ClientSideValidations](https://github.com/bcardarella/client_side_validations-rails_2).
11
-
12
10
## Project Goals ##
13
11
14
12
1. Follow the best practices for client side validations developed by [Luke Wroblewski](http://www.alistapart.com/articles/inline-validation-in-web-forms/)
@@ -28,67 +26,33 @@ This repository is for Rails 3. For Rails 2 compatibility, try [Rails 2 ClientSi
28
26
29
27
## Install ##
30
28
31
-
Include Client Side Validations in your Gemfile
29
+
Include `ClientSideValidations` in your Gemfile
32
30
33
31
```ruby
34
32
gem 'client_side_validations'
35
33
```
36
34
37
35
Then run the install generator
38
36
39
-
rails g client_side_validations:install
40
-
41
-
This will install two files:
42
-
43
-
config/initializers/client_side_validations.rb
44
-
public/javascripts/rails.validations.js
45
-
46
-
## Upgrading ##
47
-
48
-
### Rails 3.1 ###
49
-
Because the javascript file is now in the asset pipeline there is no
50
-
need to rerun the generator after upgrading.
51
-
52
-
### Rails 3.0 ###
53
-
Always be sure to run
37
+
```
38
+
rails g client_side_validations:install
39
+
```
54
40
55
-
rails g client_side_validations:install
41
+
This will install the initializer:
56
42
57
-
After upgrading Client Side Validations. There is a good chance that the
58
-
rails.validations.js file has changed.
43
+
```
44
+
config/initializers/client_side_validations.rb
45
+
```
59
46
60
47
## Usage ##
61
48
62
-
### Rails 3.1 ###
63
49
The javascript file is served up in the asset pipeline. Add the
64
50
following to your `app/assets/javascripts/application.js` file.
65
51
66
52
```javascript
67
53
//= require rails.validations
68
54
```
69
55
70
-
### Rails 3.0 ###
71
-
Client Side Validations requires [jQuery](http://jquery.com) version >= 1.6
72
-
73
-
Include the `rails.validations.js` file in your layout
0 commit comments