posts.js.coffee.erb
$('.list').infinitescroll {url: '<%= list_posts_path %>', triggerAt: 700, container: $('.container'), appendTo: $('.container'), page: 1}
This makes an exception:
throw Error ("NameError: undefined local variable or` list_posts_path 'method for # <#: 0x00000003557438> \ n ...
list_posts_path returns the correct path if I use it in the controller. What am I doing wrong?
ruby-on-rails coffeescript
Jonas
source share