我正在使用下面从 index.html.haml 粘贴的代码。“如果”条件永远不会返回真并且颜色没有改变,谁能告诉我为什么它不返回真
%table#movies
%thead
%tr
- if @sort_type == 'title'
%th.hilite= link_to "Movie Title", movies_path(:sort_type => "title"), id:"title_header"
- else
%th= link_to "Movie Title", movies_path(:sort_type => "title"), id:"title_header"
%th Rating
- if @sort_type == 'release'
%th.hilite= link_to "Release Date", movies_path(:sort_type => "release"), id:"release_date_header"
- else
%th= link_to "Release Date", movies_path(:sort_type => "release"), id:"release_date_header"
%th More Info