What is the .rb.swap file for?

I generated a model “user” @ first.

then i added some code into the model.

after this, i generated a scaffold for model “user” and controller
“admin”.

but i dont need the scaffold again so i “ruby script/destroy scaffold
user admin”

the model and controller has been deleted.

i check out the app/model/ dir, their is a file called .rb.swap.

i need to recover the model user, but how?can i recover it from
the .rb.swap file?what is the .rb.swap for?

Ruby N. wrote:

the model and controller has been deleted.

i check out the app/model/ dir, their is a file called .rb.swap.

i need to recover the model user, but how?can i recover it from
the .rb.swap file?what is the .rb.swap for?

That was likely generated by whatever text editor you used to edit the
model. vi? But it’s definitely not part of Rails and there’s nothing
Rails can do with it.


http://www.5valleys.com/
http://www.workingwithrails.com/person/8078