can display scope
This commit is contained in:
parent
905844f7bb
commit
d9f6bb3b4e
|
@ -43,7 +43,7 @@ class Bulletin
|
|||
|
||||
field :public, :type => Boolean, :default => true
|
||||
|
||||
scope :can_display,where(is_checked: true)
|
||||
scope :can_display,all_of(is_checked: true,is_rejected: false,is_pending: false)
|
||||
scope :available_for_lang, ->(locale){ where("available_for_#{locale}".to_sym => true) }
|
||||
|
||||
mount_uploader :image, ImageUploader
|
||||
|
|
|
@ -43,7 +43,7 @@ class NewsBulletin
|
|||
|
||||
field :public, :type => Boolean, :default => true
|
||||
|
||||
scope :can_display,where(is_checked: true)
|
||||
scope :can_display,all_of(is_checked: true,is_rejected: false,is_pending: false)
|
||||
scope :available_for_lang, ->(locale){ where("available_for_#{locale}".to_sym => true) }
|
||||
|
||||
mount_uploader :image, ImageUploader
|
||||
|
|
Loading…
Reference in New Issue