3

Well, the question is: is there any possibility to use kaminari paginator with vue.js in ruby on rails project? According to kaminari tutorial, I just can do this in my controller

class PostsController < ApplicationController
  def index
    @posts = Post.page(params[:page])
  end
end

and in view:

<%= paginate @posts %>

But in case of vue.js you have to pass variable @posts in json format like:

respond_to do |format|
   format.json { render json: @versions }
end

to vue.js.

tagaism
  • 624
  • 2
  • 7
  • 26
  • I haven't tried it myself but you might want to use Vue.js Paginator instead of Kaminari (see https://hootlex.github.io/vuejs-paginator/) – DaniG2k Oct 03 '17 at 15:12

0 Answers0