Skip to content
Snippets Groups Projects
Commit ac6b90d9 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

change collections controller authentication

parent d732241b
No related branches found
No related tags found
No related merge requests found
class CollectionsController < ApplicationController
before_action :set_collection, only: [:show, :update, :destroy, :like, :add_learning_object]
before_action :authenticate_user!, except: [:index, :show]
before_action :authenticate_user!, only: [:show, :update, :destroy, :like, :add_learning_object]
# GET /collections
# GET /collections.json
def index
@collections = collection_repository.all current_user
if user_signed_in?
@collections = collection_repository.all Collections::UserPublicContext.new(current_user)
else
@collections = collection_repository.all
end
end
# GET /collections/1
......
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