Error with Kaminari pagination in Rails 3?

That's what I need. @stories = Story. Where(:keynote_id => @keynote).

Order('created_at DESC'). Page(params:page) or Keynote. Has_many :stories @stories = @keynote.stories.

Order('created_at DESC'). Page(params:page).

That's exactly what I just did, thank you! – Felipe Cerda Nov 21 at 1:10.

Kaminari can also paginate arrays (which is what you have) array = Story. Find_all_by_keynote_id(@keynote, :order => 'created_at DESC') @stories = Kaminari. Paginate_array(array).

Page(params:page).

1 Thanks! I didn't know that. I used another approach but with the same result.

I put this in my controller @stories = Story. Where("keynote_id =? ", params:keynote_id).

Order("created_at DESC"). Page(params:page) – Felipe Cerda Nov 21 at 1:08.

You are feeding the page method an array when it is expecting an Active Record Relation. If you aren't familiar with that term then you should have a look at the active record query guide. According to the Kaminari docs this is how you are supposed to use it: @stories = Story.

Order(:created_at). Page(params:page).

That's what I need. – Felipe Cerda Nov 21 at 0:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions