Module RacingOnRails::FormTagHelper
In: app/helpers/racing_on_rails/form_tag_helper.rb

Label + form fields HTML

Methods

Public Instance methods

[Source]

    # File app/helpers/racing_on_rails/form_tag_helper.rb, line 11
11:     def labelled_text(object_name, method, label_text = nil, text = nil, label_options = {}, text_class = nil)
12:       %Q{#{label(object_name, method, "#{label_text || method.to_s.titleize}", label_options)} <div class="labelled #{text_class}" id="#{object_name}_#{method}">#{text || instance_variable_get("@#{object_name}").send(method)}</div>}
13:     end

[Source]

   # File app/helpers/racing_on_rails/form_tag_helper.rb, line 6
6:     def labelled_text_field_tag(attribute, text = attribute.to_s.titleize, value = nil, text_field_options = {})
7:       label_options = text_field_options.delete(:label) || {}
8:       %Q{#{label_tag(attribute, "#{text}", label_options)} #{text_field_tag(attribute, value, text_field_options)}}
9:     end

[Validate]