Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/star_it/label_form_builder.rb

Instance Method Summary collapse

Instance Method Details

#label_with_star(method, text = nil, options = {}, &block) ⇒ Object



4
5
6
7
# File 'lib/star_it/label_form_builder.rb', line 4

def label_with_star(method, text = nil, options = {}, &block)
  options.merge!(class: "star_it #{options[:class]}") if StarRequiredFields.needed_for(@object.class.name, method)
  label_without_star(method, text, options, &block)
end