add saved search gallery link, can only view your own saved searches, normalize saved search categories

This commit is contained in:
r888888888
2015-11-24 16:26:04 -08:00
parent 90eb374d06
commit 89794a7ef2
7 changed files with 35 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
CurrentUser.user = User.admins.first
CurrentUser.ip_addr = "127.0.0.1"
SavedSearch.where("category is not null and category <> ''").find_each do |ss|
print ss.category + " -> "
ss.normalize
puts ss.category
ss.save
end