views:

13

answers:

2

What's the difference between ruby script/destroy model and rails destroy model?

+1  A: 

There's no real difference, only that script/destroy is Rails 2 and rails destroy is Rails 3.

In Rails 3 all the separate scripts were removed and replaced with the single rails script, which accepts all the different commands that used to be in separate scripts. In this case destroy is the opposite to generate - it deletes all the generated files.

Matt
+1  A: 

the former is the 2.* syntax, the later the 3.* syntax. See http://edgeguides.rubyonrails.org/3_0_release_notes.html#script-replaced-by-script-rails

hellvinz