Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby rails delete all of a model in console

user.destroy #For a single record
user.agents.destroy_all #For a collection
 
PREVIOUS NEXT
Tagged: #ruby #rails #delete #model #console
ADD COMMENT
Topic
Name
9+3 =