Rendering field data as a link in Ruby on Rails...

Posted by bgadoci on Stack Overflow See other posts from Stack Overflow or by bgadoci
Published on 2010-04-19T20:12:39Z Indexed on 2010/04/19 20:23 UTC
Read the original article Hit count: 191

Ok, I think this is probably an easy question but for the life of my I can't figure it out. I have created a table called ugtags and in that table I have two columns (beyond the basics), 'name' and 'link'.

I am trying to allow a user to add a link to a page. Ideally they would enter the link title (name) and the url (link) and in the view it would display the title as a link to the url that was entered in the link column.

I there a way to do it by simply affecting the <%= link_to h(ugtag.name) %> code?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby