Guest User

Untitled

a guest
Dec 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. def index
  2. nil_conversation!
  3.  
  4. @profiles = Profile.all.where.not(id: current_profile)
  5. @conversations = Conversation.includes(:recipient, :messages).find(session[:conversations])
  6. end
  7.  
  8. <% @conversations.each do |conversation| %>
  9. <%= render 'conversation', conversation: conversation, profile: current_profile %>
  10. <% end %>
  11.  
  12. <%= render 'conversations/conversation_content', messages: conversation.messages, profile: profile %>
  13.  
  14. <div id="listing-infinite-scrolling">
  15. <%= render messages.paginate(:page => params[:page], :per_page => 10), profile: profile %>
  16. </div>
  17.  
  18. <div id="paginate-infinite-scrolling">
  19. <% will_paginate %>
  20. </div>
Add Comment
Please, Sign In to add comment