Skip to content

Commit

Permalink
[ifmeorg#1713] Resolved merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Warmenhoven committed Apr 24, 2020
2 parents f98ba85 + a5b82d4 commit e2d4112
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
5 changes: 0 additions & 5 deletions app/controllers/moments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ def index
def show
show_with_comments(@moment)
@resources = ResourceRecommendations.new(@moment).call
# @matched_tags = ResourceRecommendations.new(@moment).matched_tags
# @filter_tags = @matched_tags.uniq.map do |t|
# "filter[]=#{t}&"
# end
# @filter_tags = @filter_tags.join
@resources_tags = resources_url_tags
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/moments/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<div class="smallMarginTop">
<div class="label"><%= label_tag "What resources could help?" %> </div>
<ul>
<% @resources.each do |item| %>
<% @resources.take(3).each do |item| %>
<li><%= link_to item['name'], item['link'] %></li>
<%end %>
<li><%= link_to 'More...', "/resources?#{@resources_tags}" %></li>
Expand Down
2 changes: 1 addition & 1 deletion spec/services/moment_keywords_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
it 'downcases words' do
expect(keywords).to include('addiction')
end

it 'removes special characters' do
expect(keywords).to include('teachers')
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 e2d4112

Please sign in to comment.