green_light 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -1
- data/lib/green_light/rules.rb +2 -1
- data/lib/green_light/version.rb +1 -1
- metadata +4 -4
data/README.rdoc
CHANGED
@@ -17,7 +17,9 @@ Run this generator to copy the required assets to your public folder:-
|
|
17
17
|
|
18
18
|
rails g green_light_assets
|
19
19
|
|
20
|
-
Download jQuery and the {jQuery Validation Plugin}[http://bassistance.de/jquery-plugins/jquery-plugin-validation/] and include them in your layout header.
|
20
|
+
Download {jQuery}[http://jquery.com/] and the {jQuery Validation Plugin}[http://bassistance.de/jquery-plugins/jquery-plugin-validation/] and include them in your layout header.
|
21
|
+
|
22
|
+
<%= javascript_include_tag 'jquery-1.x.x.min', 'jquery.validate.min' %>
|
21
23
|
|
22
24
|
Also, insert the following javascript include tag in your layout html header:-
|
23
25
|
|
data/lib/green_light/rules.rb
CHANGED
@@ -25,7 +25,8 @@ module GreenLight
|
|
25
25
|
validation_objs.each do |val_obj|
|
26
26
|
params[:val_obj] = val_obj
|
27
27
|
# Call each validation method
|
28
|
-
|
28
|
+
validation_method = val_obj.class.name.split('::').last.underscore
|
29
|
+
result = send(validation_method, params) if respond_to? validation_method
|
29
30
|
data.merge!(result) unless result.nil?
|
30
31
|
end
|
31
32
|
data
|
data/lib/green_light/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: green_light
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Phil McClure
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-10 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|