Sha256: 53a816bf83d58a9dfe4cf3a267d0a0f29be214a8e3a913e2bc8cad9969f2457c
Contents?: true
Size: 706 Bytes
Versions: 28
Compression:
Stored size: 706 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
28 entries across 28 versions & 1 rubygems