Actually, rails overloads Ruby's autoload. So they do share some behavior. What rails does is it lets you only provide a module name and rails will try to find the path for you.
Also, the class reloading is done through ActionDispatch::Reloader. Those are middlewares (There's 3 of them by default IIRC).
I wrote about how it works and how you can use that to customize some of your code inside the app/ folder.
Also, the class reloading is done through ActionDispatch::Reloader. Those are middlewares (There's 3 of them by default IIRC).
I wrote about how it works and how you can use that to customize some of your code inside the app/ folder.
Shameless plug: http://pothibo.com/2013/07/namespace-stuff-in-your-app-folde...