Advertisement
Guest User

Untitled

a guest
Jan 8th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. [207, 216] in /home/deploy/peatio/current/app/controllers/application_controller.rb
  2. 207: if current_user
  3. 208: gon.current_user = { sn: current_user.sn }
  4. 209:
  5. 210: byebug
  6. 211:
  7. => 212: gon.accounts = current_user.accounts.inject([]) do |memo, account|
  8. 213: memo[account.currency] = {
  9. 214: currency: account.currency,
  10. 215: balance: account.balance,
  11. 216: locked: account.locked,
  12. (byebug) current_user.accounts
  13. #<Account::ActiveRecord_Associations_CollectionProxy:0x00005620dcf82c78>
  14.  
  15. (byebug) current_user.accounts.class
  16. Account::ActiveRecord_Associations_CollectionProxy
  17. (byebug) current_user.accounts.first.class
  18. *** TypeError Exception: wrong argument type Hash (expected String)
  19.  
  20. nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement