Class: PdfNewsletter

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/pdf_newsletter.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.currentObject



28
29
30
# File 'app/models/pdf_newsletter.rb', line 28

def self.current
 self.recent.first
end

.whats_new?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'app/models/pdf_newsletter.rb', line 32

def self.whats_new?
  true
end

Instance Method Details

#monthObject



15
16
17
# File 'app/models/pdf_newsletter.rb', line 15

def month
  self.publish_on.strftime("%B")
end

#titleObject



11
12
13
# File 'app/models/pdf_newsletter.rb', line 11

def title
  "#{month} Newsletter"
end

#yearObject



19
20
21
# File 'app/models/pdf_newsletter.rb', line 19

def year
  self.publish_on.year
end