cldwalker / hirb

A mini view framework for console/irb that's easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu.
http://tagaholic.me/hirb/
MIT License
1.65k stars 72 forks source link

HABTM relationships break with Hirb #47

Closed saratrice closed 12 years ago

saratrice commented 13 years ago

I have a couple of has_and_belongs_to_many relationships in my project, and with Hirb, they appear as method not found.

E.g.,

Class Dog has_and_belongs_to_many :kennels

Class Kennel has_and_belongs_to_many :dogs

Dog.first.kennels method not found: kennels

As soon as I disable Hirb, they work again.

cldwalker commented 12 years ago

Hirb doesn't do any monkey-patching of any classes outside of hirb unless you ask it to via require 'hirb/import_object'. To debug your issue I'll need your irbrc and enough of the Rails app that replicates your issue.

cldwalker commented 12 years ago

Closing but feel free to comment if you want to resolve this.