Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: undefined method 'link_to_remote'

I'm new to RJS, I follow the short example in this guide

I'm including all the default javascript library in the application.html.erb

when I fire up the server and check the page, I got a error:

Showing /Users/PowerBook/Desktop/makprojects/drummercymbal/app/views/videos/show.html.erb where line #9 raised:

undefined method `link_to_remote' for #<#<Class:0x217f64>:0x213d74>
Extracted source (around line #9):

6:   <li>Cat</li>
7:   <li>Mouse</li>
8: </ul>
9: <%= link_to_remote("Add a fox", :url => { :action => :add}) %>
like image 545
mko Avatar asked Dec 16 '10 05:12

mko


1 Answers

If you are using rails 3.x.x, than there is no link_to_remote, there is link_to 'Add a fox', { :action => :add}, :remote => true

like image 166
tig Avatar answered Oct 23 '22 22:10

tig