Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

deleted 1 characters in body
Source Link
felipeclopes
  • 4.1k
  • 2
  • 27
  • 36

On mostly helpers, the last arg is a hash of html options for the element.

<%== f.labelform_for @user, :html => {:class => 'x', 'data-bar' => 'baz'} %>

You can also check other alternatives in the documentation ActionsView::Helpers::FormHelper

On mostly helpers, the last arg is a hash of html options for the element.

<%= f.label @user, :html => {:class => 'x', 'data-bar' => 'baz'} %>

You can also check other alternatives in the documentation ActionsView::Helpers::FormHelper

On mostly helpers, the last arg is a hash of html options for the element.

= form_for @user, :html => {:class => 'x', 'data-bar' => 'baz'} %>

You can also check other alternatives in the documentation ActionsView::Helpers::FormHelper

Source Link
felipeclopes
  • 4.1k
  • 2
  • 27
  • 36

On mostly helpers, the last arg is a hash of html options for the element.

<%= f.label @user, :html => {:class => 'x', 'data-bar' => 'baz'} %>

You can also check other alternatives in the documentation ActionsView::Helpers::FormHelper

lang-rb

AltStyle によって変換されたページ (->オリジナル) /