I am playing with the console, I change some model code and now I want to test it. I normally re-start the console. Is there a quicker way? Maybe a console command to reload the model code?
I am playing with the console, I change some model code and now I want to test it. I normally re-start the console. Is there a quicker way? Maybe a console command to reload the model code?
You can type reload!.
I think it's important to note that reload! doesn't reinitialize rails console session existing objects, it just reloads the code:
https://stackoverflow.com/a/10465369/9185715
So, if you have instantiated any objects in the console, they won't be reinitialized.