lib/tasks/db.rake in browsercms-3.0.1 vs lib/tasks/db.rake in browsercms-3.0.2

- old
+ new

@@ -1,8 +1,12 @@ require 'find' namespace :db do + + desc "Drop, create and migrate the database" + task :redo => ["db:drop", "db:create", "db:migrate"] + namespace :fixtures do desc 'Dumps all models into fixtures.' task :dump => :environment do models = [] Find.find(RAILS_ROOT + '/app/models') do |path| @@ -12,10 +16,10 @@ models -= %w[content_observer guest_user file_block image_block email_message_mailer] puts "Models: " + models.join(', ') models.each do |m| - model = m.classify.constantize + model = m.tableize.classify.constantize create_fixture(model) create_fixture(model.version_class) if model.versioned? end end