Skip to content

Commit

Permalink
Use .concat to appease the cops a little bit.
Browse files Browse the repository at this point in the history
Signed-off-by: Josep M. Blanquer <blanquer@gmail.com>
  • Loading branch information
blanquer committed Aug 11, 2016
1 parent f748978 commit cf5c653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/praxis-blueprints/blueprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ def validate(context = Attributor::DEFAULT_ROOT_CONTEXT)
if value.respond_to?(:validating) # really, it's a thing with sub-attributes
next if value.validating
end
errors.push(*sub_attribute.validate(value, sub_context))
errors.concat(sub_attribute.validate(value, sub_context))
end
self.class.attribute.type.requirements.each do |req|
validation_errors = req.validate(keys_with_values, context)
errors.push(*validation_errors) unless validation_errors.empty?
errors.concat(validation_errors) unless validation_errors.empty?
end
errors
ensure
Expand Down
2 changes: 1 addition & 1 deletion lib/praxis-blueprints/field_expander.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def expand_with_member_attribute(object, fields = true)
new_fields = fields.is_a?(Array) ? fields[0] : fields

result = [expand(object.member_attribute.type, new_fields)]
history[object][fields].push(*result)
history[object][fields].concat(result)

result
end
Expand Down

0 comments on commit cf5c653

Please sign in to comment.