我收到错误消息:语法错误,意外的keyword_ensure,期望在我拥有的haml模板上使用$end,但是它提取的提取的源代码行号超出了文件的末尾。我的代码是:
%span
* click a gamertag to see detailed medal stats
.seperator{ :id => 'medal-stats', :style => 'margin: 20px 0 20px 0;' }
- @sorted_players.each do |player|
.medal_stats{ :id => "player_medals_#{Digest::MD5.hexdigest(player['Gamertag'])}" }
%h3
#{player['Gamertag']}'s Medals
%table.team-table.table.table-bordered.table-striped.table-hover
%thead
%tr
- @metadata['MedalsMetadata']['MedalClasses'].each do |medal_class|
%td
#{medal_class['Name']}
%tbody
- player['MedalStats'] = player['MedalStats'].sort_by { |medal| medal['TotalMedals'] }.reverse
%tr
- @metadata['MedalsMetadata']['MedalClasses'].each do |medal_class|
%td
- player['MedalStats'].each do |medal|
- if medal['ClassId'] != medal_class['Id']
- next
.medal-entry{ :style => "background-image: ('#{ X343ApiController.asset_url_generator_basic( medal['ImageUrl']['BaseUrl'],
medal['ImageUrl']['AssetUrl'], 'medium') }');" }
#{medal['TotalMedals']}