class ViewModel::AccessControl::Composed::NoRequiredConditionsError

Error type when no ‘if` conditions succeed.

def initialize(nodes, reasons)

def initialize(nodes, reasons)
  super('Action not permitted because none of the possible conditions were met.', nodes)
  @reasons = reasons
end

def merge(other)

def merge(other)
  NoRequiredConditionsError.new(nodes | other.nodes,
                                Lazily.concat(reasons, other.reasons).uniq)
end

def meta

def meta
  super.merge(conditions: @reasons.to_a)
end