davidcelis/recommendable — Issue #4: Investigate a way to eager load recommendable models in development
Author: davidcelis
Created: 2012-02-09 19:29:45+00:00
State: open

In test and production, models are automatically eager loaded when the application boots. This is good, as `acts_as_recommendable` appends the class's constant into the `Recommendable.recommendable_classes` array for use internally. In development, however, eager loading can cause too much slowdown in requests. This means that, in the development environment, these class constants have to be referenced manually before attempting to get recommendations. If possible, I need to find a way to either:

1. Eager load only models that act_as_recommendable and alter the Railtie accordingly
2. Figure out a better way to internally keep track of classes that act_as_recommendable