How do I create a hyper link from the restaurant.name value below.
When this list is returned, I want each restaurant name to link to the
show action.
Any help would be appreciated.
Thanks
How do I create a hyper link from the restaurant.name value below.
When this list is returned, I want each restaurant name to link to the
show action.
Any help would be appreciated.
Thanks
On Sep 11, 6:12 pm, Craig C. [email protected]
wrote:
How do I create a hyper link from the restaurant.name value below.
<%= link_to restaurant.name, :action => ‘show’, :id => restaurant
%>
Jeff
On 9/11/07, Jeff [email protected] wrote:
On Sep 11, 6:12 pm, Craig C. [email protected]
wrote:How do I create a hyper link from the restaurant.name value below.
<%= link_to restaurant.name, :action => ‘show’, :id => restaurant
%>
<% = link_to h(restaurant.name), :action => ‘show’, :id => restaurant %>
If you output a db value, be sure to wrap it in h() to prevent XSS and
other nastiness.
Thanks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs