Answers for "rails class reminders"

0

rails class sti reminders

class AddNotes < ActiveRecord::Migration[5.2]
  def change
    create_table :notes do |t|
      t.string :type # this tells Rails we plan on using STI
      t.string :title
      t.boolean :is_completed
      t.jsonb :data, default: {}
      t.timestamps
    end

    add_index :notes, :data, using: :gin
  end
end
Posted by: Guest on February-23-2021
0

rails class note reminders

ReminderJob = Struct.new(:event) do def enqueue(job)   job.delayable = event   job.save! end def perform   event.send_reminder end def queue_name   'reminder_queue' endend
Posted by: Guest on February-23-2021

Browse Popular Code Answers by Language