# Help converting this \<a href\> tag to rails

**URL:** <https://www.ruby-forum.com/t/help-converting-this-a-href-tag-to-rails/141151>\
**Category:** Rails\
**Created:** [June 22, 2008, 10:33pm UTC](https://www.ruby-forum.com/t/help-converting-this-a-href-tag-to-rails/141151 "2008-06-22T22:33:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skirkpatrick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Post date:** [June 22, 2008, 10:33pm UTC](https://www.ruby-forum.com/t/help-converting-this-a-href-tag-to-rails/141151/1 "2008-06-22T22:33:12Z")

</div>

I have this working html tag but am not sure how to convert it rails.  
i’m getting compile errors.

original html:

[WebQuestPro.com](http://webquestpro.com)

i have tried the following:

\<% link\_to(“[WebQuestPro.com](http://WebQuestPro.com)”, “[http://webquestpro.com](http://webquestpro.com)”, :onmouseover =\>  
“drc(‘Enter into the world of professional web marketing.’,‘PlanMagic  
WebQuest Pro’); return true;” onmouseout=“nd(); return  
true;”) %\>

any ideas?

---

<div class="post-metadata">

**Author:** ![skirkpatrick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/73ab20/32.png) [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Post date:** [June 22, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/help-converting-this-a-href-tag-to-rails/141151/2 "2008-06-22T23:03:30Z")

</div>

On Jun 22, 2008, at 4:33 PM, Scott K. wrote:

> true;"\>WebQuestPro.com  
> Which is also fine in Rails.

> i have tried the following:
> 
> \<% link\_to(“[WebQuestPro.com](http://WebQuestPro.com)”, “[http://webquestpro.com](http://webquestpro.com)”, :onmouseover  
> =\>  
> “drc(‘Enter into the world of professional web marketing.’,‘PlanMagic  
> WebQuest Pro’); return true;” onmouseout=“nd(); return  
> true;”) %\>

Use \<%= (with the equals sign) if you want to put the result of the  
link\_to() into the page output.

> any ideas?

If you aren’t generating the links, then there’s no need to convert  
HTML to erb with Rails helpers.

-Rob

Rob B. [http://agileconsultingllc.com](http://agileconsultingllc.com)  
removed\_email\_address@domain.invalid
