Skip to content

Commit

Permalink
[ifmeorg#1713] shortened lines of code as per rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Warmenhoven committed Apr 9, 2020
1 parent 9d67ddc commit ad42eb9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/services/resource_recommendation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ def resources
matched_resources = []
moment_keywords = []
@moment.categories.each do |category|
moment_keywords.push(category['name'].split, html_clean(category['description']).split)
moment_keywords.push(category['name'].split,
html_clean(category['description']).split)
end
@moment.moods.each do |mood|
moment_keywords.push(mood['name'].split, html_clean(mood['description']).split)
moment_keywords.push(mood['name'].split,
html_clean(mood['description']).split)
end
@moment.strategies.each do |strategy|
moment_keywords.push(strategy['name'].split, html_clean(strategy['description']).split)
moment_keywords.push(strategy['name'].split,
html_clean(strategy['description']).split)
end
moment_keywords.push(moment_name, moment_why, moment_fix)
moment_keywords = moment_keywords.flatten
Expand Down

0 comments on commit ad42eb9

Please sign in to comment.