script/console Reload Models

1

If you are one of those Rails applications developers, then you would have
used this command before:

ruby script/console

It is very nice and gives you the ability to load your environment and try
it as you wish, but what if you changed anything in the application models? You
will find that the console isn’t aware of these changes at all!

So what can you do to make it aware of your changes?

Here it is; just run this command in your console:

Dispatcher.reset_application!

Now you can try those new changes you made in your models.

Comments

1

Another option is to run the command
reload!
It will have the same effect

Post a Comment

eSpace podcast Prodcast

RSS iTunes