Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails, link_to is using a period and not a / in the URL?

<%= link_to 'View the item', items_url(@item, :only_path => false) %>

Which is generating:

http://0.0.0.0:3000/items.124/

This is no good as it has a period where it should have a forward slash like:

http://0.0.0.0:3000/items/124/

Anyone know y? thanks

like image 788
AnApprentice Avatar asked Nov 16 '10 06:11

AnApprentice


1 Answers

shoot, should be item_url not items_url

like image 164
AnApprentice Avatar answered Oct 04 '22 19:10

AnApprentice