Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `render' for #18

Open
ccfiel opened this issue Sep 1, 2015 · 1 comment
Open

undefined method `render' for #18

ccfiel opened this issue Sep 1, 2015 · 1 comment

Comments

@ccfiel
Copy link

ccfiel commented Sep 1, 2015

I got this error undefined method `render' for #<#Class:0xb2df7098:0xb3bc2c18>

In index.js.erb this line cause the error.
// Append new data
$("<%=j render(:partial => 'products', :object => @products) %>").appendTo($(".infinite-table table"));

I put index.js.erb in app/assets/javascripts/

What did I miss?

zmillman added a commit that referenced this issue Sep 4, 2015
@zmillman
Copy link
Contributor

zmillman commented Sep 4, 2015

index.js.erb needs to be in app/views. It should be rendered as a response to a request through ActionController.

Thanks for catching this! I've updated the README with more information about the expected location of the view templates :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants