1module RejectionHelper |
|
|
2 def rejection_reason(code) |
3 unless code.blank? |
|
4 t(:"#{code}", scope: :"rejections.titles") |
|
5 end |
|
6 end |
|
|
8 def rejection_description(code) |
9 unless code.blank? |
|
10 t(:"#{code}", scope: :"rejections.descriptions").html_safe |
|
11 end |
|
12 end |
|
|
14 def rejection_reasons |
15 t(:"rejections.titles").map do |value, label| |
|
16 if value.to_s.in?(Rejection::HIDDEN_CODES) |
|
17 ["#{label} (will be hidden)", value] |
|
18 else |
|
19 [label, value]
|
|
20 end |
|
21 end |
|
22 end |
|
|
24 def rejection_descriptions |
25 t(:"rejections.descriptions") |
|
26 end |
|
27end |