2011-05-03 106 views
1

我有這條線在html.erb文件:爲什麼這行代碼會引發語法錯誤?

<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> 

這裏的錯誤:

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 '(' 
+0

太長開放標籤,沒看過。 – 2011-05-03 04:26:22

+0

oh Ryan ......:P – user730569 2011-05-03 04:28:58

回答

5

link to應該link_to

+1

woops ........ -_- – user730569 2011-05-03 04:26:04

+1

雖然仍然出現語法錯誤? – user730569 2011-05-03 04:29:31

0

使用本<%= link_to "the signup page.", "www.dreamstill.com" %>

0
<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> 

你沒有在三號線

相關問題