ruby-on-railshamlhtml-table

Rails haml, table, how to set td min width?


I am trying to layout out a form using a table. I use rails and haml. I have the code below but I can't get the min_width to work - the text "min_width", etc. actually show up in the page.

  %table
    %tr 
      %td min_width => "100px;"
      ='aaa'   
      %td.field  
        = f.input :last_name, :label => ' '

Solution

  • Change the line

    %td min_width => "100px;"
    

    to

    %td{:min_width => "100px;"}