Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def index
- nil_conversation!
- @profiles = Profile.all.where.not(id: current_profile)
- @conversations = Conversation.includes(:recipient, :messages).find(session[:conversations])
- end
- <% @conversations.each do |conversation| %>
- <%= render 'conversation', conversation: conversation, profile: current_profile %>
- <% end %>
- <%= render 'conversations/conversation_content', messages: conversation.messages, profile: profile %>
- <div id="listing-infinite-scrolling">
- <%= render messages.paginate(:page => params[:page], :per_page => 10), profile: profile %>
- </div>
- <div id="paginate-infinite-scrolling">
- <% will_paginate %>
- </div>
Add Comment
Please, Sign In to add comment