Skip to content

Commit

Permalink
[ifmeorg#1713] display all resources on moments show page]
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Warmenhoven committed Apr 6, 2020
1 parent d0b3041 commit 25f3e09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/controllers/moments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class MomentsController < ApplicationController
include MomentsFormHelper
include Shared
include TagsHelper
include PagesConcern

before_action :set_moment, only: %i[show edit update destroy picture]
before_action :load_viewers, only: %i[new edit create update picture]
Expand All @@ -25,6 +26,7 @@ def index
# GET /moments/1.json
def show
show_with_comments(@moment)
@resources = fetch_resources
end

# GET /moments/new
Expand Down
6 changes: 3 additions & 3 deletions app/views/moments/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<div class="smallMarginTop">
<div class="label">What Resources could help?</div>
<ul>
<li><%= link_to '7 Cups', '#' %></li>
<li><%= link_to 'A Close Look at PTSD Among Aging Adults', '#' %></li>
<li><%= link_to 'Antistress', '#' %></li>
<% @resources.each do |resource| %>
<li><%= resource["name"] %></li>
<% end %>
<li><%= link_to 'More...', '/resources' %></li>
</ul>
</div>
Expand Down

0 comments on commit 25f3e09

Please sign in to comment.