green_light 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -1,14 +1,13 @@
1
1
  = green_light
2
2
 
3
- Provides client side validation, with the help of the {jquery validation plugin}[http://bassistance.de/jquery-plugins/jquery-plugin-validation/], while keeping validation in the model, where it belongs.
3
+ Provides client side validation, with the help of the {jquery validation plugin}[http://bassistance.de/jquery-plugins/jquery-plugin-validation/]. Keeping validation in the model, where it belongs.
4
4
 
5
5
 
6
6
  == Installation
7
7
 
8
- Add green_light to your Gemfile and run the bundle install command.
8
+ Add green_light to your Gemfile and run the <tt>bundle install</tt> command.
9
9
 
10
10
  gem 'green_light'
11
- bundle install
12
11
 
13
12
 
14
13
  == Usage
@@ -17,15 +16,15 @@ Generate the required green_light configuration:-
17
16
 
18
17
  rails g green_light:install
19
18
 
20
- Include the JQuery validation plugin in your app/assets/javascripts/application.js file:-
19
+ Include the JQuery validation plugin in your <tt>app/assets/javascripts/application.js</tt> file:-
21
20
 
22
21
  //= require jquery.validate
23
22
 
24
- Since the validation rules are creating dynmically they need to be included at the top of your layout file:-
23
+ Since the validation rules are creating dynmically they need to be included in the header of your layout file:-
25
24
 
26
25
  <%= javascript_include_tag "green_light" %>
27
26
 
28
- Specify which models you want to have client-side validation in the config/green_light.yml file e.g.:-
27
+ Specify which models you want to have client-side validation in the <tt>config/green_light.yml</tt> file e.g.:-
29
28
 
30
29
  validate_models: ['ModelName1', 'ModelName2']
31
30
 
@@ -52,6 +51,13 @@ For validations that are not yet supported, the gem will degrade gracefully to t
52
51
  For Rails 3 support use the older version (0.0.3) of green_light
53
52
 
54
53
 
54
+ == Requirements
55
+
56
+ JQuery is require for the {jquery validation plugin}[http://bassistance.de/jquery-plugins/jquery-plugin-validation/]. Be sure to include this in your <tt>application.js</tt> file:-
57
+
58
+ //= require jquery
59
+
60
+
55
61
  == Running the Tests
56
62
 
57
63
  bundle install
@@ -3,6 +3,6 @@ class AssetsController < ApplicationController
3
3
 
4
4
  def green_light
5
5
  @rules = GreenLight::Rules.generate(GREEN_LIGHT[:validate_models])
6
- respond_with(@rules)
6
+ respond_with(@rules, :layout => false)
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module GreenLight
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green_light
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
4
+ prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 1
9
- - 4
10
- version: 0.1.4
8
+ - 5
9
+ version: 0.1.5
11
10
  platform: ruby
12
11
  authors:
13
12
  - Phil McClure
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-08-04 00:00:00 +01:00
17
+ date: 2011-09-12 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -70,27 +69,23 @@ rdoc_options: []
70
69
  require_paths:
71
70
  - lib
72
71
  required_ruby_version: !ruby/object:Gem::Requirement
73
- none: false
74
72
  requirements:
75
73
  - - ">="
76
74
  - !ruby/object:Gem::Version
77
- hash: 3
78
75
  segments:
79
76
  - 0
80
77
  version: "0"
81
78
  required_rubygems_version: !ruby/object:Gem::Requirement
82
- none: false
83
79
  requirements:
84
80
  - - ">="
85
81
  - !ruby/object:Gem::Version
86
- hash: 3
87
82
  segments:
88
83
  - 0
89
84
  version: "0"
90
85
  requirements: []
91
86
 
92
87
  rubyforge_project: green_light
93
- rubygems_version: 1.4.2
88
+ rubygems_version: 1.3.6
94
89
  signing_key:
95
90
  specification_version: 3
96
91
  summary: Simple client side validation that keeps validation in the models