Class: ActionView::Helpers::FormBuilder

Inherits:
Object
  • Object
show all
Includes:
GetText
Defined in:
lib/gettext_rails/action_view/form_builder.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from GetText

#create_mofiles, #create_mofiles_org

Instance Method Details

#label_with_gettext(method, text = nil, options = {}) ⇒ Object



19
20
21
22
# File 'lib/gettext_rails/action_view/form_builder.rb', line 19

def label_with_gettext(method, text = nil, options = {})
  text ||= s_("#{@object.class}|#{method.to_s.humanize}")
  @template.label(@object_name, method, text, options.merge(:object => @object))
end