ujh/fountainpencompanion

View on GitHub
app/models/micro_cluster.rb

Summary

Maintainability
A
0 mins
Test Coverage
class MicroCluster < ApplicationRecord
  belongs_to :macro_cluster, optional: true
  has_many :collected_inks
  has_many :public_collected_inks,
           -> { where(private: false) },
           class_name: "CollectedInk"

  paginates_per 100

  scope :unassigned, -> { where(macro_cluster_id: nil) }
  scope :without_ignored, -> { where(ignored: false) }
  scope :ignored, -> { where(ignored: true) }
end