Skip to content

Commit 7b56b56

Browse files
committed
Merge branch 'main' of github.com:excid3/noticed
2 parents b980d21 + a9bae80 commit 7b56b56

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

UPGRADE.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@ rails db:migrate
3030
To migrate your data to the new tables, loop through your existing notifications and create new records for each one. You can do this in a Rake task or in the Rails console:
3131

3232
```ruby
33-
# Temporarily define the Notification model to access the old table
34-
class Notification < ActiveRecord::Base
33+
# Temporarily define the model to access the old table
34+
class TempNotification < ActiveRecord::Base
3535
self.inheritance_column = nil
36+
self.table_name = "notifications"
3637
end
3738

3839
# Migrate each record to the new tables
39-
Notification.find_each do |notification|
40+
TempNotification.find_each do |notification|
4041
attributes = notification.attributes.slice("type", "created_at", "updated_at").with_indifferent_access
4142
attributes[:type] = attributes[:type].sub("Notification", "Notifier")
4243
attributes[:params] = Noticed::Coder.load(notification.params)

lib/noticed/bulk_delivery_method.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Noticed
2-
class BulkDeliveryMethod < ApplicationJob
2+
class BulkDeliveryMethod < Noticed.parent_class.constantize
33
include ApiClient
44
include RequiredOptions
55

0 commit comments

Comments
 (0)