Skip to content
Snippets Groups Projects
Commit 123dfcdd authored by Matheus Agio Nerone's avatar Matheus Agio Nerone
Browse files

fix bug when user not signed in

parent 407970ec
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ class LearningObjectsController < ApplicationController ...@@ -13,7 +13,7 @@ class LearningObjectsController < ApplicationController
# GET /learning_objects/1 # GET /learning_objects/1
# GET /learning_objects/1.json # GET /learning_objects/1.json
def show def show
@liked = learning_object_repository.liked?(current_user, @learning_object) @liked = learning_object_repository.liked?(current_user, @learning_object) if user_signed_in?
end end
# GET /learning_objects/new # GET /learning_objects/new
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
</div> </div>
</div> </div>
<div class="rating-panel"> <div class="rating-panel">
<% if user_signed_in? %>
<div class="actions"> <div class="actions">
<div class="col-md-3 action"> <div class="col-md-3 action">
<%= link_to like_learning_object_path(id: @learning_object.id), class: 'vote',method: :post, remote: true do %> <%= link_to like_learning_object_path(id: @learning_object.id), class: 'vote',method: :post, remote: true do %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment