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

Return to Answer

Post Timeline

remove one more hash rocket in compact example
Source Link
Alan H.
  • 16.7k
  • 17
  • 85
  • 116

Use the :html hash:

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

Or

= form_for @user, :html =>: {class: 'x', data: { bar: 'baz' } } do |f|

Use the :html hash:

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

Or

= form_for @user, :html => {class: 'x', data: { bar: 'baz' } } do |f|

Use the :html hash:

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

Or

= form_for @user, html: {class: 'x', data: { bar: 'baz' } } do |f|
added 83 characters in body
Source Link
Raj
  • 23.1k
  • 14
  • 105
  • 148

Use the :html hash:

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

Or

= form_for @user, :html => {class: 'x', data: { bar: 'baz' } } do |f|

Use the :html hash:

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

Use the :html hash:

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

Or

= form_for @user, :html => {class: 'x', data: { bar: 'baz' } } do |f|
Source Link
MurifoX
  • 15.1k
  • 3
  • 40
  • 60

Use the :html hash:

= form_for @user, :html => {:class => 'x', 'data-bar' => 'baz'} do |f|
lang-rb

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