Sha256: 712638ca9c40341922a784f306eb1db3ca86f08d5f34e053632a5508aaa0cd70
Contents?: true
Size: 306 Bytes
Versions: 5
Compression:
Stored size: 306 Bytes
Contents
class BoxroomPopulateUserIdInShareLinks < ActiveRecord::Migration[5.0] def change active_users = Boxroom::User.where.not(:name => nil) if active_users.any? && Boxroom::ShareLink.any? Boxroom::ShareLink.where(:user_id => nil).update_all(:user_id => active_users.first.id) end end end
Version data entries
5 entries across 5 versions & 1 rubygems