class Factor < ActiveRecord::Base
  has_many :report_factors
  has_many :reports, :through => :report_factors
  


  def del!
    if reports.size > 0
      self.update_attributes(:active => false)
    else
      self.destroy
    end
  end
  
end
