Class: Section

Inherits:
ApplicationRecord show all
Defined in:
app/models/section.rb

Instance Method Summary collapse

Instance Method Details

#sorted_nodesObject


18
19
20
# File 'app/models/section.rb', line 18

def sorted_nodes
  nodes.where.not(id: Node.no_point_id).sorted
end

#update_cache_versionObject


13
14
15
16
# File 'app/models/section.rb', line 13

def update_cache_version
  # 记录节点变更时间,用于清除缓存
  CacheVersion.section_node_updated_at = Time.now.to_i
end