Ruby on Rails Thursday, August 18, 2016

Hi,

I see that "require_or_load" keeps a "loaded" array with the files that have been required or loaded. Shall I prefer "require_or_load" vs "required" in my Ruby on Rails code.

Note that I have come to this after trying to sort out a list of WARNINGS that I was getting when, on development environment, I turned the "config.eager_load" to "true".
The warnings were about constants already defined, which was because some of the files, originally "required", then with "config.eager_load" "true" were "loaded" second time.

Your thoughts?

P. 

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e1d5612f-8e8c-4d5b-af23-d76b9b30094b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment