Class: PdfNewsletter
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PdfNewsletter
- Defined in:
- app/models/pdf_newsletter.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.current ⇒ Object
28 29 30 |
# File 'app/models/pdf_newsletter.rb', line 28 def self.current self.recent.first end |
.whats_new? ⇒ Boolean
32 33 34 |
# File 'app/models/pdf_newsletter.rb', line 32 def self.whats_new? true end |
Instance Method Details
#month ⇒ Object
15 16 17 |
# File 'app/models/pdf_newsletter.rb', line 15 def month self.publish_on.strftime("%B") end |
#title ⇒ Object
11 12 13 |
# File 'app/models/pdf_newsletter.rb', line 11 def title "#{month} Newsletter" end |
#year ⇒ Object
19 20 21 |
# File 'app/models/pdf_newsletter.rb', line 19 def year self.publish_on.year end |