, . , : ActiveRecord::Base.connection.tables, .
puts ActiveRecord::Base.connection.tables
ActiveRecord::Base.connection.tables.each do |table|
next if table.match(/\Aschema_migrations\Z/)
klass = table.singularize.camelize.constantize
klass.delete_all
end
Edit:
id 1, create , destroy .
ActiveRecord::Migration.drop_table(:users)
ActiveRecord::Migration.create_table(:users)
, User, id 1. , drop_table create_table , , , , User. , :
User.table_name
ActiveRecord::Migration.drop_table(klass.table_name)