hii friends,,,,,i m new to rails......i think there is a problem in destroy command .

Are you saying to run rails destroy model foo and foo doesn’t exist then you should get an error or exception message? If you try this on the command line rails destroy model foo, it will run the opposite of the generate command; however, nothing ever existed, so can’t see the harm.

Are you saying to run rails destroy model foo and foo doesn’t exist then you should get an error or exception message? If you try this on the command line rails destroy model foo, it will run the opposite of the generate command; however, nothing ever existed, so can’t see the harm.

let me explain this problem … -------------------rails destroy----------------------------this command destroy model,scaffold etc …

problem is that if a model or other structure is exist than ,this command will destroy all the related file to it…good …till now no problem…

but problem is that if a model etc is not exist than till this command remove the file …it should not be done…there is no such a file name exist…

some error or exception should be execute at this time …

i think this a problem???

if not than expalin me…

The behaviour is consistent with other commands. If, for example, you run ‘rake db:migrate’ and there are no migrations that need to be run, the task simply returns you to the command line without comment. One might make the argument that it should say something like ‘there are no migrations that need to be run.’ Or one might start submitting patches and see what the community thinks :wink:

Best regards, Bill