Sha256: f17144811cc063ffcb4ae4576ef0d34840e339107aa22d095a198473d67f978c
Contents?: true
Size: 716 Bytes
Versions: 53
Compression:
Stored size: 716 Bytes
Contents
ActionView::Helpers::FormHelper.module_eval do def required_label(object_name, method, text = nil, options = {}) options = {:class => "required"}.merge!(options) text ||= "#{method.to_s.humanize} *" label(object_name, method, text, options) end end ActionView::Helpers::FormBuilder.module_eval do def required_label(method, text = nil, options = {}) @template.required_label(@object_name, method, text, objectify_options(options)) end end ActionView::Helpers::FormTagHelper.module_eval do def required_label_tag(name, text = nil, options = {}) options = {:class => "required"}.merge!(options) text ||= "#{name.to_s.humanize} *" label_tag(name, text, options) end end
Version data entries
53 entries across 53 versions & 2 rubygems