Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

[BUG] Debugging console freezes when executing a Rails' association on a model instance #77

Open
bgvo opened this issue Nov 14, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@bgvo
Copy link

bgvo commented Nov 14, 2020

It freezes when trying to run an Activerecord association. For instance:

User has_many :journeys

I'm inside User.some_method:

def some_method
  jard
  journeys
end

Inside the method, when I run:

jard >> journeys

It just freezes and won't output the ActiveRecord::Associations::CollectionProxy instance.

This doesn't happen with gem 'byebug', where I'm able to see the result.

Thanks!

@bgvo bgvo added the bug Something isn't working label Nov 14, 2020
@krzykamil
Copy link

Hey

I know this issue is somewhat old now, but I can't seem to replicate the issue.

def some_method
  jard
  orders
end

and then in console after calling the method:

jard >> orders
  Order Load (0.7ms)  SELECT "orders".* FROM "orders" WHERE "orders"."user_id" = $1  [["user_id", 27]]
=> []
jard >> 

Here my User model also has has_many relationship to orders.

Maybe the issue is/was connected to the way to call the method? I would be happy to help with the PR for the issue if we can replicate it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants