Demystifying Rails autoloading
19-Aug-2021 1348
Also known as "why do I need to require stuff sometimes, and not other times?"I think it’s really important to understand the software you’re using, particularly big frameworks like Rails that follow convention over configuration and thus end up magically doing things for you. What are you supposed to do when the magic is gone?Today I want to talk about one such piece of magic: why you need to require things in Ruby, and why you (generally) don’t in Rails.First of all, you’ll note that the title refers to Rails autoloading. I did that for the SEO, but that’s not the only piece in play, here. In fact, there are three:RubyBundlerRails.
Demystifying Rails autoloading #ruby #rubydeveloper #rubyonrails #Demystifying #Rails #autoloading https://rubyonrails.ba/link/demystifying-rails-autoloading