NameError (undefined local variable or method `fetch_records' for ....
Hi,
I'm getting this wierd error.
NameError (undefined local variable or method `fetch_records' for #<CommentsDatatable:0x00007f7fae91f8b8>):
app/controllers/admin_controller.rb:69:in `block (2 levels) in comments'
app/controllers/admin_controller.rb:67:in `comments'
Code:
def comments
respond_to do |format|
format.html
format.json { render json: CommentsDatatable.new(view_context) }
end
end
Hey Victor,
Are you sure fetch_records
isn't a method you're supposed to define in your class? From the examples for the datatables gem, it looks like you typically write that method yourself in the class.
Hey Chris,
I found the solution. https://github.com/jbox-web/ajax-datatables-rails/blob/master/doc/migrate.md
I used the old methods...
Thanks for your help! and support!