Skip to content
Snippets Groups Projects
Commit a8e2e2ec authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'sociable-controller' into 'master'

Fix sociable controller



See merge request !242
parents f247ab50 8b8bc6d2
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ module SociableController
included do
before_action :authenticate_user!, only: [:like, :unlike]
before_action :view_object!, only: VIEWABLE_METHODS
before_action :sociable, only: [:like, :unlike]
end
# POST /v1/learning_objects/1/like
......
......@@ -45,6 +45,10 @@ class LearningObjectPolicy < ApplicationPolicy
end
end
def index?
record
end
def add_object?
record if user_exists?
end
......
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