Module: Housekeeping::Projects

Extended by:
ActiveSupport::Concern
Included in:
CachedMap, CachedMapItem, CachedMapRegister
Defined in:
lib/housekeeping/projects.rb

Overview

Concern the provides housekeeping and related methods for models that belong_to a Project

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#annotates_community_object?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/housekeeping/projects.rb', line 58

def annotates_community_object?
  self.respond_to?(:is_community_annotation?) && self.is_community_annotation?
end

#is_community?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/housekeeping/projects.rb', line 63

def is_community?
  (self.class <= Shared::SharedAcrossProjects) ? true : false
end

#set_project_idObject



43
44
45
46
47
# File 'lib/housekeeping/projects.rb', line 43

def set_project_id
  if self.new_record?
    self.project_id ||= Current.project_id
  end
end