Files
old-holivud2/app/models/note.rb

10 lines
227 B
Ruby
Raw Normal View History

2020-05-31 22:38:19 +02:00
class Note < ApplicationRecord
include Syncable
belongs_to :user, optional: true
belongs_to :notable, polymorphic: true
validates :content, presence: true
2020-06-03 07:24:01 +02:00
scope :order_by_recent, -> { order(created_at: :desc) }
2020-05-31 22:38:19 +02:00
end