lib/hanami/model/mapped_relation.rb in hanami-model-1.3.2 vs lib/hanami/model/mapped_relation.rb in hanami-model-1.3.3

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Hanami module Model # Mapped proxy for ROM relations. # # It eliminates the need to use #as for repository queries @@ -49,11 +51,11 @@ # .to_a # end # end def [](attribute) @relation[attribute] - rescue KeyError => e - raise UnknownAttributeError.new(e.message) + rescue KeyError => exception + raise UnknownAttributeError.new(exception.message) end end end end