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

Version Path
jacobat-refinerycms-0.9.6.14 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.34 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.33 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.32 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.31 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.30 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.29 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.28 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.27 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.26 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.25 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.24 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.23 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.22 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.21 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.19 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.18 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.17 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.16 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.6.15 vendor/plugins/refinery/lib/refinery/form_helpers.rb