Skip to content

Commit

Permalink
[ifmeorg#1713] Code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
AlineRibeiro committed Apr 24, 2020
1 parent a9657e7 commit a5b82d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/controllers/moments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def show
show_with_comments(@moment)
@resources = ResourceRecommendations.new(@moment).call
@matched_tags = ResourceRecommendations.new(@moment).matched_tags
@moment_keywords = MomentKeywords.new(@moment).call
@filter_tags = @matched_tags.uniq.map do |t|
"filter[]=#{t}&"
end
Expand Down
1 change: 0 additions & 1 deletion app/services/resource_recommendations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def all_resources
resources = JSON.parse(File.read('doc/pages/resources.json'))
resources.each do |item|
item['tags'].map! { |tag| I18n.t("pages.resources.tags.#{tag}") }
item['languages'].map! { |language| I18n.t("languages.#{language}") }
end
resources
end
Expand Down
6 changes: 3 additions & 3 deletions spec/services/resource_recommendations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
name: 'SELF-INJURY@',
why: 'text',
fix: 'text' )}

subject(:resources) { ResourceRecommendations.new(moment).call}

describe 'A test for resources method from ResourceRecommendations class' do
it 'returns recommended resources based on moment keywords' do
available_resource = [{'tags'=> ["self_injury"]}]
Expand All @@ -18,4 +18,4 @@
expect(resources).not_to eq(available_resource2)
end
end
end
end

0 comments on commit a5b82d4

Please sign in to comment.