From 56c860ac2fbe57d2032a8da430379b27e7c7bc7d Mon Sep 17 00:00:00 2001 From: Toks Date: Tue, 11 Aug 2015 20:30:05 -0400 Subject: [PATCH] #2319 fix rails 4 syntax --- script/fixes/035_fix_nico_seiga_artist_urls.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/fixes/035_fix_nico_seiga_artist_urls.rb b/script/fixes/035_fix_nico_seiga_artist_urls.rb index c0bfd74f0..06d8474c9 100644 --- a/script/fixes/035_fix_nico_seiga_artist_urls.rb +++ b/script/fixes/035_fix_nico_seiga_artist_urls.rb @@ -7,4 +7,4 @@ ActiveRecord::Base.connection.execute("set statement_timeout = 0") CurrentUser.user = User.admins.first CurrentUser.ip_addr = "127.0.0.1" -ArtistUrl.update_all("normalized_url = replace(normalized_url, '?target=illust_all/', '/')", "normalized_url like 'http://seiga.nicovideo.jp/user/illust/%'") +ArtistUrl.where("normalized_url like 'http://seiga.nicovideo.jp/user/illust/%'").update_all("normalized_url = replace(normalized_url, '?target=illust_all/', '/')")