edk-wizardly 0.1.8.9 → 0.1.8.10
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/lib/validation_group.rb +4 -0
- metadata +1 -1
data/lib/validation_group.rb
CHANGED
|
@@ -6,7 +6,9 @@ module ValidationGroup
|
|
|
6
6
|
# validation groups defined for each model
|
|
7
7
|
base.class_eval do
|
|
8
8
|
cattr_accessor :validation_group_classes
|
|
9
|
+
cattr_accessor :validation_titles
|
|
9
10
|
self.validation_group_classes = {}
|
|
11
|
+
self.validation_titles = {}
|
|
10
12
|
|
|
11
13
|
def self.validation_group_order; @validation_group_order; end
|
|
12
14
|
def self.validation_groups(all_classes = false)
|
|
@@ -32,6 +34,8 @@ module ValidationGroup
|
|
|
32
34
|
# superclasses)
|
|
33
35
|
(@validation_group_order ||= []) << name.to_sym
|
|
34
36
|
|
|
37
|
+
self.validation_titles[name.to_sym] = options[:title]
|
|
38
|
+
|
|
35
39
|
unless included_modules.include?(InstanceMethods)
|
|
36
40
|
# jeffp: added reader for current_validation_fields
|
|
37
41
|
attr_reader :current_validation_group, :current_validation_fields
|