Class: Atrium::Description

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

Instance Method Summary collapse

Instance Method Details

#blank?Boolean

Returns:

  • (Boolean)


76
77
78
# File 'app/models/atrium/description.rb', line 76

def blank?
  title.blank? && essay.blank?
end

#generate_solr_idObject



63
64
65
# File 'app/models/atrium/description.rb', line 63

def generate_solr_id
  "atrium_description_#{id}"
end

#pretty_titleObject



68
69
70
# File 'app/models/atrium/description.rb', line 68

def pretty_title
  title.blank? ? "Description #{id}" : title
end

#show_on_this_page?Boolean

Returns:

  • (Boolean)


72
73
74
# File 'app/models/atrium/description.rb', line 72

def show_on_this_page?
  page_display.nil? || page_display == "samepage"
end