Tyler DeWitt
Tyler DeWitt

Reputation: 23576

Print additional information on an erb line with haml

I have this:

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

(notice the addition on of the word "Found")

How do I do that in haml?

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

complains about Found not being a defined constant

Upvotes: 0

Views: 78

Answers (1)

Tyler DeWitt
Tyler DeWitt

Reputation: 23576

Whoops, ask and you'll figure it out:

%h1.left= "#{pluralize(@player_to_team_histories_count.count, 'Player')} Found"

Upvotes: 1

Related Questions