0

At the controller end, I have an array

@bookmarks = Bookmark.where('user_id = ? && note is NULL',current_user.id).order('created_at DESC').page(params[:page_2]).per(4)

Then at the View I have this render tag through which I want to render @bookmarks

<%= render @bookmarks %>

Then there is page for _bookmark which will display @bookmarks

bookmark.title 
bookmark.created_at

But this process is giving me error of no partial. (I try to implement kaminari via Ajax)

0

1 Answer 1

1

using the render method like that will 'cause it to look for a partial in bookmarks/_bookmark.

you can also specify the partial and collection with render partial: 'folder/mypartial', collection: @bookmarks

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.