Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.57 KB | None | 0 0
  1.   def show
  2.    
  3.     customer_id = params[:customer_id]
  4.     @user = User.find_by_id(customer_id)
  5.     @merchant_customer = MerchantCustomer.find_by_customer_id(customer_id)
  6.     @transactions = Transaction.where(user_id: customer_id).order(created_at: :desc)
  7.  
  8.     @conversations = @user.merchant_conversations
  9.     @last_message_resolution = @user.message_resolutions.last
  10.  
  11.     @last_conversation = Conversation.find_last_conversation(@merchant_customer.merchant_id, 'user', @user.id)
  12.     @last_conversation_ref = ConversationRef.find_last_conversation_ref(@last_conversation)
  13.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement