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

Support for Mongoid dynamic fields #67

Closed kimsuelim closed 11 years ago

kimsuelim commented 11 years ago

If the attribute is dynamic field, Mongoid not provide the getters and setters and enforce to method_missing call. In this case must use the other provided accessor methods: ([] and []=) or (read_attribute and write_attribute).

Please check pull request. Thanks.

cldwalker commented 11 years ago

Hi. Thanks for the pull. Unfortunately your use case does not fit with ObjectTable. ObjectTable handles classes that have fields with corresponding methods. Since Mongoid does not do that for your case I suggest subclassing Table for your own use or writing an adapter class around Mongoid for ObjectTable.