Sha256: fd6e87f767939503a1f9050d996a75e065aa3529203e669f6a02e99f358376ca
Contents?: true
Size: 547 Bytes
Versions: 3
Compression:
Stored size: 547 Bytes
Contents
namespace :blacklight do # task to clean out old, unsaved searches # rake blacklight:delete_old_searches[days_old] # example cron entry to delete searches older than 7 days at 2:00 AM every day: # 0 2 * * * cd /path/to/your/app && /path/to/rake blacklight:delete_old_searches[7] RAILS_ENV=your_env desc "Removes entries in the searches table that are older than the number of days given." task :delete_old_searches, :days_old, :needs => :environment do |t, args| Search.delete_old_searches(args[:days_old].to_i) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
blacklight-3.0.0pre4 | lib/railties/blacklight.rake |
blacklight-3.0.0pre3 | lib/railties/blacklight.rake |
blacklight-3.0pre2 | lib/railties/blacklight.rake |