mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Apply syntax_tree formatting to lib/*
This commit is contained in:
@ -33,11 +33,8 @@ module HasErrors
|
||||
def add_errors_from(obj)
|
||||
return if obj.blank?
|
||||
|
||||
if obj.is_a?(StandardError)
|
||||
return add_error(obj.message)
|
||||
end
|
||||
return add_error(obj.message) if obj.is_a?(StandardError)
|
||||
|
||||
obj.errors.full_messages.each { |msg| add_error(msg) }
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user