Module: ModelExt::GroupLandingPages::InstanceMethods

Included in:
GroupLandingPage
Defined in:
lib/model_ext/group_landing_pages/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#has_no_content?Boolean

Returns true if the group landing page has no content to display used to filter out empty group landing pages

Examples:

glp = GroupLandingPage.find(1)
glp.has_no_content? # => true/false

Returns:

  • (Boolean)

    true if no content, false otherwise



13
14
15
# File 'lib/model_ext/group_landing_pages/instance_methods.rb', line 13

def has_no_content?
  group_landing_page_groups.blank? && group_single_type.blank? && default_query.blank?
end