github
378 of 408 new or added lines in 45 files covered. (92.65%)
22 existing lines in 5 files now uncovered.15561 of 18693 relevant lines covered (83.25%)
512.08 hits per line
1 |
# frozen_string_literal: true
|
|
2 |
|
|
UNCOV
3
|
module CsvReport |
× |
UNCOV
4
|
extend ActiveSupport::Concern |
× |
5 |
|
|
UNCOV
6
|
included do
|
× |
UNCOV
7
|
attr_accessor :send_to
|
× |
8 |
|
|
UNCOV
9
|
validate do
|
× |
UNCOV
10
|
if send_to.present? && send_to.any?
|
× |
11 |
errors.add(:send_to, :invalid) if contacts.count != send_to.count |
× |
UNCOV
12
|
end
|
× |
UNCOV
13
|
end
|
× |
14 |
|
|
UNCOV
15
|
def send_to=(send_to_ids) |
× |
UNCOV
16
|
@send_to = send_to_ids.reject(&:blank?) |
× |
UNCOV
17
|
end
|
× |
18 |
|
|
UNCOV
19
|
def contacts |
× |
20 |
unless instance_variable_defined?(:@contacts) |
× |
21 |
@contacts ||= Billing::Contact.where(id: send_to) |
× |
UNCOV
22
|
end
|
× |
23 |
@contacts
|
× |
UNCOV
24
|
end
|
× |
UNCOV
25
|
end
|
× |
UNCOV
26
|
end
|
× |