Ruby facets has a lot of useful libraries. Sometimes you only want to load the ones that you need. Here’s a little snippet that you can use
Rails won’t load facets as the ‘lib’ param is false. We then load the libraries manually through initializers. This helps when facets unwittingly clobbers some of the other gems you are using.
Tags: Rails
There is also another quite experimental way to load I’ve never used which loads corresponding facets extension with method_missing http://github.com/rubyworks/facets/blob/master/lib/core/facets-live.rb
your solution is more elegant. thanks!