Hommer Smith
Hommer Smith

Reputation: 27852

How to mix Ruby and strings in slim?

Say I have an h1 where I want to welcome a user with a link, so I do this:

h1
  | Hello user!

But if I want to add a link:

h1
  | Hello user, = link_to 'Click here', '#'

What is the correct approach in this case?

Upvotes: 0

Views: 129

Answers (1)

Sergio Tulentsev
Sergio Tulentsev

Reputation: 230481

Just put it on the next line

h1
  | Hello user, 
  = link_to 'Click here', '#'

Upvotes: 1

Related Questions