add index for bulletin without create_indexes
This commit is contained in:
parent
a27d1818f5
commit
577a845e1f
|
@ -85,6 +85,8 @@ class Bulletin
|
|||
scope :filter_cats_and_tags, ->(cats,tags) {filter_by_widget_categories(cats,false).filter_by_tags(tags)}
|
||||
before_create :set_expire
|
||||
before_save :check_limit
|
||||
index({postdate: 1}, { unique: false, background: true })
|
||||
index({is_top: -1,postdate: -1, _id: -1}, { unique: false, background: true })
|
||||
def to_calendar_param
|
||||
self.to_param
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue