Updated

app/helpers / rejection_helper.rb

A
27 lines of codes
4 methods
3.0 complexity/method
2 churn
11.93 complexity
0 duplications
module RejectionHelper
  1. RejectionHelper has no descriptive comment
def rejection_reason(code) unless code.blank? t(:"#{code}", scope: :"rejections.titles") end end def rejection_description(code) unless code.blank? t(:"#{code}", scope: :"rejections.descriptions").html_safe end end def rejection_reasons t(:"rejections.titles").map do |value, label| if value.to_s.in?(Rejection::HIDDEN_CODES) ["#{label} (will be hidden)", value] else [label, value] end end end def rejection_descriptions t(:"rejections.descriptions") end end