1module RejectionHelper
  • Complexity 2 » saikuro
2  def rejection_reason(code)
 
3    unless code.blank?
 
4      t(:"#{code}", scope: :"rejections.titles")
 
5    end
 
6  end
 
7
  • Complexity 2 » saikuro
8  def rejection_description(code)
 
 9    unless code.blank?
 
10      t(:"#{code}", scope: :"rejections.descriptions").html_safe
 
11    end
 
12  end
 
  • Complexity 3 » saikuro
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
 
  • Complexity 1 » saikuro
24  def rejection_descriptions
 
25    t(:"rejections.descriptions")
 
26  end
 
27end