diff --git a/actiontext/app/models/action_text/record.rb b/actiontext/app/models/action_text/record.rb new file mode 100644 index 0000000000..f2e7f6b04d --- /dev/null +++ b/actiontext/app/models/action_text/record.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +module ActionText + class Record < ActiveRecord::Base #:nodoc: + self.abstract_class = true + end +end + +ActiveSupport.run_load_hooks :action_text_record, ActionText::Record diff --git a/actiontext/app/models/action_text/rich_text.rb b/actiontext/app/models/action_text/rich_text.rb index 1a3ffdfa27..d52a80c97e 100644 --- a/actiontext/app/models/action_text/rich_text.rb +++ b/actiontext/app/models/action_text/rich_text.rb @@ -5,7 +5,7 @@ module ActionText # It also holds all the references to the embedded files, which are stored using Active Storage. # This record is then associated with the Active Record model the application desires to have # rich text content using the +has_rich_text+ class method. - class RichText < ActiveRecord::Base + class RichText < Record self.table_name = "action_text_rich_texts" serialize :body, ActionText::Content