13

I think I have seen Ryan Bates do it one of his screencasts, but I can't find it.

I believe there is a command you can run while in script/console that lets you reload your models (if say you have made a change) so that you dont have to exit and then recall the console.

Any Ideas?

aarona
  • 35,986
  • 41
  • 138
  • 186

2 Answers2

24

Just use:

reload!

However, do note that this won't reflect the changes on the models that are already instantiated in your console. To reflect changes in already instantiated models, you may visit this answer.

Rakib
  • 12,376
  • 16
  • 77
  • 113
Slobodan Kovacevic
  • 6,848
  • 3
  • 29
  • 33
1

If you are using rspec use

load 'some_class.rb'
Sachin L S
  • 41
  • 3