We can use the shorter syntax fort ordered_champs(_private)
now that the old preview is gone
This commit is contained in:
parent
685f4a6eb7
commit
7fdb523b1a
2 changed files with 3 additions and 6 deletions
|
@ -10,6 +10,7 @@ class Champ < ApplicationRecord
|
|||
scope :updated_since?, -> (date) { where('champs.updated_at > ?', date) }
|
||||
scope :public_only, -> { where(private: false) }
|
||||
scope :private_only, -> { where(private: true) }
|
||||
scope :ordered, -> { includes(:type_de_champ).order('types_de_champ.order_place') }
|
||||
|
||||
def public?
|
||||
!private?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue