user730569
user730569

Reputation: 4004

Why is this line of code raising a syntax error?

I have this line in a html.erb file:

<p> Share your unique link with as many people as you can. <b>The more people you refer, the sooner you will be invited to DreamStill.</b> Also, about every two weeks, <b>artists that have referred the greatest number of users will be featured in an email sent out to all DreamStill members!</b> To check up on how many users you have referred, simply enter your same email address (the one you used to sign up) into the signup form at <%= link to "the signup page.", "www.dreamstill.com" %></p>

Here's the error:

compile error
/app/app/views/user_mailer/email.html.erb:7: syntax error, unexpected '<'
<p> Share your unique link with...
 ^
/app/app/views/user_mailer/email.html.erb:7: syntax error, unexpected tIDENTIFIER, expecting kDO or '{' or '('

Upvotes: 1

Views: 453

Answers (3)

Hitesh
Hitesh

Reputation: 825

use this <%= link_to "the signup page.", "www.dreamstill.com" %>

Upvotes: 0

vasu
vasu

Reputation: 391

<p> Share your unique link with as many people as you can. 
<b>The more people you refer, the sooner you will be invited to DreamStill.</b> 
**Also, about every two weeks, <b>artists that have referred the greatest number of users will be featured in an email sent out to all DreamStill members!</b>** 
To check up on how many users you have referred, simply enter your same email address (the one you used to sign up) into the signup form at <%= link to "the signup page.", "www.dreamstill.com" %>
</p>

You not have open tag at line three

Upvotes: 0

hammar
hammar

Reputation: 139930

link to should be link_to.

Upvotes: 5

Related Questions