Permalink
Browse files

Skip models that aren't Derived from ActiveRecord

Models that aren't db backed will cause db:seed:dump to fail.
  • Loading branch information...
1 parent c4a320a commit e122933c3c254fdd26cf41fa50bb3b70408a4b2b @iconoclast committed Jun 27, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/seed_dump/perform.rb
View
@@ -27,6 +27,7 @@ def setup(env)
def loadModels
Dir[@model_dir].each do |f|
model = File.basename(f, '.*').camelize.constantize
+ next unless model.ancestors.include?(ActiveRecord::Base)
@models.push model if @opts['models'].include?(model) || @opts['models'].empty?
end
end

0 comments on commit e122933

Please sign in to comment.