Ruby on Rails Monday, August 26, 2019

Can you show the generated response of the request? try using the escape_javascript on the second render too ("j render....", the "j" at the beginning).

El lun., 26 ago. 2019 a las 9:38, Nikola Okonesh (<nikolaokonesh@gmail.com>) escribió:

I use pagination ajax (kaminari and pagy gem), click more page not work. how it


  var colum = document.querySelector("#categories_index");
  var pagin = document.querySelector("#categories_index_paginate");

  colum.innerHTML += ("<%= j render(partial: 'article/posts/post', collection: @posts, cached: true) %>");
  pagin.innerHTML = ("<%= render(partial: 'next_link') %>");

SyntaxError: missing ) in parenthetical

I not use JQuery.


use only "@rails/ujs": "^6.0.0" webpacker.


Rails -v 6.0.0.
Ruby -v 2.6.1


Help! Thanks!!!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9aaa2adf-c841-4a00-a43c-92c8e4dce8f7%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcDBTAdi-H1rr3Lf9hCe7C4fifz46J_ec3OYAarVJME7GQ%40mail.gmail.com.

No comments:

Post a Comment