0

我有这个:

<h1 class="left"><%= pluralize @player_to_team_histories_count.count, "Player" %> Found

(注意“发现”一词的添加)

我该如何在haml中做到这一点?

%h1.left= pluralize(@player_to_team_histories_count.count, "Player") Found 

抱怨Found不是一个定义的常量

4

1 回答 1

1

哎呀,问,你会弄明白的:

%h1.left= "#{pluralize(@player_to_team_histories_count.count, 'Player')} Found"
于 2012-09-22T23:02:30.693 回答