Rails Console: reload! not reflecting changes in model files? What could be possible reason?

reload! only reloads the latest code in the console environment. It does not re-initialize existing objects.

This means if you have already instantiated any objects, their attributes would not be updated – including newly introduced validations. However, if you create a new object, its attributes (and also validations) will reflect the reloaded code.
more here

Leave a Comment