lib/tram/policy/validation_error.rb in tram-policy-0.3.1 vs lib/tram/policy/validation_error.rb in tram-policy-0.4.0
- old
+ new
@@ -9,10 +9,10 @@
private
def initialize(policy, filter)
@policy = policy
- messages = policy.errors.reject(&filter).map(&:full_message)
+ messages = policy.errors.to_a.reject(&filter).map(&:message)
super (["Validation failed with errors:"] + messages).join("\n- ")
end
end
end