Welcome Guest | Login

Rhtml question

I just put up a template of a class roster http://682csudh.augustine.hostingrails.com/

I want the URL and email to open those urls and a "mail to" window, respectively

right now the URL seems to be looking for a subfolder, instead of the the web site...here the code :

<td><%= student.Lastname %></td>
  <td><%= student.Firstname %></td>
  <td><%= student.date %></td>
  <td><%= student.Info %></td>
  <td><%= link_to student.url, :action =>student.url%></td>
  <td><%= link_to student.email, :action =>   "show",:email => student.email %></td>
 </tr>
<% end %>

how can I make them real links, anyone know?

2007-01-14 12:54 AM

You can read more about howto make links in ruby on this page:
http://www.rubyonrails.org/api/classes/ActionView/Helpers/UrlHelper.html

I'd use this code:
<td><%= auto_link(student.url)%></td>
<td><%= mail_to(student.email)%></td>

2007-01-14 10:26 AM

Mikael
mikaelf.com
Cool, thanks for the link, and the code worked like a charm!

cheers to you Mr.Spiken :)

2007-01-14 12:06 PM

Very helpful, thx!

2007-01-16 02:06 PM

Happy to help! :)

2007-01-17 05:08 PM

Mikael
mikaelf.com

Hello Guest! In order to post you must be an active client with us, please log in or sign up.