![](/img/trans.png)
[英]Turn a div into a link in HAML using a Rails link_to tag, with nested content within
[英]HAML link_to in rails does not apply a class on page load
以下腳本的問題在於,以下代碼僅在刷新頁面后而不是在第一個頁面加載期間使releases.content處於活動狀態。 我剛開始編寫haml模板。 我可能會在這里做任何明顯錯誤的事情?
%li.accordion-navigation
= link_to "Last 10 Releases", "#releases"
#releases.content.active
%table.grid
%thead
%tr
%th Build
%th Deployed at
%th Report
%tbody
- @last_deployments.each do |deployment|
%tr
%td= deployment.build
%td= deployment.deployed_date
%td
= link_to "detail", certification_path(deployment.certification)
%li.accordion-navigation
= link_to "Current Bug Status", "#bug_status"
#bug_status.content.active \w
試試下面的代碼,甚至相同的代碼-
%div.content.active{ id: 'releases' }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.