mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-13 21:33:20 +01:00
Merge pull request #188 from Retrospring/fix/relationship-ordering
Order relationships by their creation date
This commit is contained in:
commit
3438534ca1
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue