X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3e99bbf5a9e124a59fc5ae72c863e89af7fa8c46..758e6da9a80e2e53a171ebc3119f813f8ff4141c:/db/migrate/004_user_enhancements.rb?ds=sidebyside diff --git a/db/migrate/004_user_enhancements.rb b/db/migrate/004_user_enhancements.rb index db17f3c35..af4b65123 100644 --- a/db/migrate/004_user_enhancements.rb +++ b/db/migrate/004_user_enhancements.rb @@ -24,7 +24,7 @@ class UserEnhancements < ActiveRecord::Migration add_index "user_tokens", ["token"], :name => "user_tokens_token_idx", :unique => true add_index "user_tokens", ["user_id"], :name => "user_tokens_user_id_idx" - User.find(:all, :conditions => "token is not null").each do |user| + User.where("token is not null").each do |user| UserToken.create(:user_id => user.id, :token => user.token, :expiry => 1.week.from_now) end