validatious-on-rails 0.3.7 → 0.3.8
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.
@@ -23,7 +23,11 @@ module ActionView # :nodoc:
|
|
23
23
|
# set, and the label text is provided. The title is set to object_name.humanize
|
24
24
|
#
|
25
25
|
def label_with_title(object_name, method, text = nil, options = {})
|
26
|
-
|
26
|
+
begin
|
27
|
+
options[:title] ||= object_name.to_s.classify.constantize.human_attribute_name(method.to_s) unless text.nil?
|
28
|
+
rescue
|
29
|
+
# skip
|
30
|
+
end
|
27
31
|
label_without_title(object_name, method, text, options)
|
28
32
|
end
|
29
33
|
alias_method_chain :label, :title
|