2016-08-26 25 views
-2
= simple_form_for @pin,html: { multipart: true } do |f| 
    - if @pin.errors.any? 
    #errors 
     %h2 
     = pluralize(@pin.errors.count, "error") 
     prevented this Pi from saving 
     %ul 
     - @pin.errors.full_messages.each do |msg| 
      %li= msg 

    .form-group 
    = f.input :title, input_html: { class: 'form-control' } 
    .form-group 
    = f.input :description, input_html: { class: 'form-control' } 
    = f.button :submit, class: "btn btn-primary"  
+0

你的問題是什麼? – jedifans

+0

不一致的縮進:1個用於縮進的選項卡,但文檔的其餘部分使用2個空格縮進。 – user6759862

+0

我該如何刪除它 – user6759862

回答

0

您的文件中混合了製表符和空格。你需要堅持一個或另一個哈姆工作。根據您的編輯器,您可以通過設置intendation字符(大多數人現在使用2或4個空格)並重新加載文件來修復它。