Class: System::Announcement

Inherits:
GenericAnnouncement
  • Object
show all
Defined in:
app/models/system/announcement.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ordered_by_date(direction = :desc) ⇒ Object

Orders the announcements by date, defaults to descending order.

Parameters:

  • direction (Symbol) (defaults to: :desc)

    The direction to order results by.


8
# File 'app/models/system/announcement.rb', line 8

scope :ordered_by_date, ->(direction = :desc) { order(start_at: direction) }

Instance Method Details

#to_partial_pathObject


10
11
12
# File 'app/models/system/announcement.rb', line 10

def to_partial_path
  'system/admin/announcements/announcement'
end