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

Version Path
refinerycms-0.9.5.13 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.12 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.11 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.10 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.9 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.8 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.7 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.6 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.5 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.4 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.3 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.2 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5.1 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.5 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4.5 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4.4 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4.3 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4.2 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4.1 vendor/plugins/refinery/lib/refinery/form_helpers.rb
refinerycms-0.9.4 vendor/plugins/refinery/lib/refinery/form_helpers.rb