1
我有這個HAML頁面渲染:HAML - 爲什麼我的HAML的文本都顯示在上面一行,儘管對代碼的差異部分
-content_for :primary_content do
Hmmm
%strong{:class => "code", :id => "message"} Hello Alex!
.container-fluid
.row-fluid
.span1 Hello 1
.span4 Hello 4
.span4 Hello 4 again
.span3 Hello 3
%strong{:class => "code"} End of page!
.container-fluid
.row-fluid
.span9 My Disclosures o ye!
.span3 This will be the side area
// Ok....what is in home?
// The two divs....
-content_for :primary_content do
-if signed_in?
// =render "sidebar/common/primary_navigation"
// If signed in, show the options for
// 1) Logout | My Profile
// 2) Create disclosure | show disclosures
Signed in
-else
// =render "devise/sessions/form"
NOT Signed in
出於某種原因,它呈現Not signed in Hmmm Hello Alex!
的頂線和然後它下面的一切。
我很困惑,因爲「未登錄」位於頁面底部,而「嗯,你好亞歷克斯」在最上面。但由於某種原因,它在屏幕上一起渲染。任何想法爲什麼?
謝謝!