Class: Georgia::Post
- Inherits:
-
Page
- Object
- Page
- Georgia::Post
- Defined in:
- app/models/georgia/post.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extra_search_params ⇒ Object
63 64 65 66 67 68 69 |
# File 'app/models/georgia/post.rb', line 63 def extra_search_params Proc.new { facet :month, :tags with(:month, params[:m]) unless params[:m].blank? with(:tags, params[:c]) unless params[:t].blank? } end |
Instance Method Details
#month ⇒ Object
11 12 13 |
# File 'app/models/georgia/post.rb', line 11 def month @month ||= published_at.strftime('%B %Y') if published_at.present? end |
#year ⇒ Object
15 16 17 |
# File 'app/models/georgia/post.rb', line 15 def year @year ||= published_at.year if published_at.present? end |