Eager load Rails application

Rodrigo Souto rodrigo at colivre.coop.br
Tue Jul 7 10:37:52 BRT 2015


Hello everyone,

On the development of the api's task mountpoint André suggested the use
of Rails.application.eager_load! to ensure every Article and Task
subclasses were properly loaded. Check it out:
https://gitlab.com/noosfero/noosfero/merge_requests/619/diffs

Although the place where he used it is not the best, I think it's a good
idea, since today we have class types hardcoded all over the code due to
this lazy loading behaviour.

What do you think about adding it now and then we slowly remove the
hardcoded types?

-- 
Rodrigo Souto <rodrigo at colivre.coop.br> :: 55 71 8131-7714
Colivre - Cooperativa de Tecnologias Livres
http://www.colivre.coop.br/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150707/7c671314/attachment.pgp>


More information about the Noosfero-dev mailing list