0

I need to “embed” a link in an object property, such as deal.description = "Click <a href='www.something.com'>here!</a>".

Doing it that way doesn’t seem to work; my show page just shows all that text (with the html tag and everything).

Trying to use #{link_to 'text', 'url'} gives NoMethodError: undefined method 'link_to' for main:Object.

This is currently in my seeds.rb file but I'll also need to somehow allow my users to enter a link inside the description on the new page.

How do I do this?

Jonathan Tuzman
  • 11,568
  • 18
  • 69
  • 129

0 Answers0