validatious-on-rails 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -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
|