68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# File 'lib/manageable/helpers/form_builder.rb', line 68
def select(method, choices, options = {}, html_options = {})
unless options[:label] == false
description_tag = @template.content_tag(:span, options.delete(:description), :class => "description") if options[:description].present?
label_tag = field_label(method, options.delete(:label), (:label_class, options))
field_tag = super(method, choices, options, html_options)
label_tag = @@field_with_errors_proc.call(method, label_tag, @object, @template)
group((:group_class, options)) do
(label_tag + field_tag + description_tag).html_safe
end
else
super(method, choices, options, html_options)
end
end
|