2016-01-20 21 views
0
<!-- Latest compiled and minified CSS --> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> 

如何將這些引導程序鏈接轉換爲haml?

有麻煩將這些鏈接到HAML ....試圖

%link {:rel => "stylesheet" href => "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous"} 
+2

那麼,是什麼問題?請更具體和清楚,以便其他人可以提供適當的答案 – Demitrian

+0

尋求調試幫助的問題(「爲什麼不是這個代碼工作?」)必須包括所需的行爲,特定的問題或錯誤以及重現它所需的最短代碼這個問題本身。請參閱:[如何創建最小,完整和可驗證示例](http://stackoverflow.com/help/mcve)。 –

回答

0

它應該是:

%link{rel: "stylesheet", href: "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css", integrity: "sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r", crossorigin: "anonymous"} 

順便說一句,請this

+0

謝謝。 。該資源是非常有幫助 – drew

0
<%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css", integrity: "sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7", crossorigin: "anonymous" %> 

...是正確的Rails way(我會刪除如果你願意HAML只)

+0

我正在尋找哈姆具體.... thx的幫助 – drew

+0

你想我刪除響應? –