* feat: create a migration to add the display ad name column to the tanle * feat: add a display ad name to the interface * feat: add a display ad name after create * feat: whoops the migration file * feat: add a DUS to update previous Display Ads names * fix: test * refactor: update the name after_save * fix: add name to params
9 lines
218 B
Ruby
9 lines
218 B
Ruby
module DataUpdateScripts
|
|
class GenerateDisplayAdNames
|
|
def run
|
|
DisplayAd.where(name: nil).find_each do |display_ad|
|
|
display_ad.update(name: "Display Ad #{display_ad.id}")
|
|
end
|
|
end
|
|
end
|
|
end
|