Merge pull request #188 from Retrospring/fix/relationship-ordering
Order relationships by their creation date
This commit is contained in:
commit
3438534ca1
|
@ -4,6 +4,8 @@ class Relationship < ApplicationRecord
|
|||
validates :source_id, presence: true
|
||||
validates :target_id, presence: true
|
||||
|
||||
default_scope { order(created_at: :asc) }
|
||||
|
||||
after_create do
|
||||
Notification.notify target, self
|
||||
|
||||
|
|
Loading…
Reference in New Issue