Reputation: 12861
I'm a newbie to Ruby on Rails, and was wondering, I currently define the title as:
<% provide(:title, @user.first_name) %>
If I wanted to add @user.last_name to that string, how could I do so?
Thank you!
Upvotes: 0
Views: 46
Reputation: 18463
You can concatenate strings with the +
operator:
<% provide(:title, @user.first_name + " " + @user.last_name) %>
Upvotes: 1