Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class HomeController < ApplicationController
- def index
- @reviews = Review.order("created_at DESC")
- @interviews = Interview.order("created_at DESC")
- @monos = Mono.order("created_at DESC")
- @olds = Old.order("created_at DESC")
- @things = @reviews + @interviews + @monos + @olds
- @things.sort_by! { |thing| thing.created_at }
- @contentL = @things.last
- @contents = Kaminari.paginate_array(@things).page(params[:page]).per(10)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement