hosh / intermodal

Intermodal: RESTful API kit for Rails 3.0+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimization: Use autoload for metaprogrammed controllers

hosh opened this issue · comments

Currently:

When each API container loads, all controllers are loaded in at once. This slows down specs.

Solution:

Use ActiveSupport#autoload or something similar to load controllers. May have to patch #autoload to accept a block. This may also fix non-eager-loaded controllers in development mode