Class: Theme
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Theme
- Defined in:
- app/models/theme.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.entity_parameters ⇒ Object
16 17 18 |
# File 'app/models/theme.rb', line 16 def self.entity_parameters %i[name slug] end |
.page_for_administration ⇒ Object
12 13 14 |
# File 'app/models/theme.rb', line 12 def self.page_for_administration ordered_by_name end |
Instance Method Details
#entries(limit = 5, region = nil, page = 1) ⇒ Object
23 24 25 |
# File 'app/models/theme.rb', line 23 def entries(limit = 5, region = nil, page = 1) Post.in_region(region).with_category_ids(post_category_ids).visible.recent.page(page).per(limit) end |