Place below associations
This commit is contained in:
+2
-2
@@ -3,8 +3,6 @@ class Card < ApplicationRecord
|
||||
Messages, Notifiable, Pinnable, Closeable, Searchable, Staged,
|
||||
Statuses, Taggable, Watchable
|
||||
|
||||
has_markdown :description
|
||||
|
||||
belongs_to :collection, touch: true
|
||||
belongs_to :creator, class_name: "User", default: -> { Current.user }
|
||||
|
||||
@@ -12,6 +10,8 @@ class Card < ApplicationRecord
|
||||
|
||||
has_one_attached :image, dependent: :purge_later
|
||||
|
||||
has_markdown :description
|
||||
|
||||
scope :reverse_chronologically, -> { order created_at: :desc, id: :desc }
|
||||
scope :chronologically, -> { order created_at: :asc, id: :asc }
|
||||
scope :latest, -> { order updated_at: :desc, id: :desc }
|
||||
|
||||
Reference in New Issue
Block a user