Sha256: 86015bd687b170f7af67a6970093a1bfd90c875f6ec483b617131dd81f8bc50e
Contents?: true
Size: 678 Bytes
Versions: 30
Compression:
Stored size: 678 Bytes
Contents
namespace :db do namespace :fixtures do desc "Load fixtures into the current environment's database. Load specific fixtures using FIXTURES=x,y" task :load => :environment do begin ActsAsSolr::Post.execute(Solr::Request::Delete.new(:query => "*:*")) ActsAsSolr::Post.execute(Solr::Request::Commit.new) (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, 'test', 'fixtures', '*.{yml,csv}'))).each do |fixture_file| ActsAsSolr::SolrFixtures.load(File.basename(fixture_file, '.*')) end puts "The fixtures loaded have been added to Solr" rescue end end end end
Version data entries
30 entries across 30 versions & 6 rubygems