added logic for available conferences based on roles in comments_controller.rb

This commit is contained in:
raluka 2015-09-03 12:17:42 +02:00
parent 52a503afd2
commit 800a41b3f9
5 changed files with 48 additions and 44 deletions

View file

@ -1,11 +1,9 @@
module Admin
class CommentsController < Admin::BaseController
load_and_authorize_resource :conference, find_by: :short_title
load_and_authorize_resource
def index
@ordered_events = Event.order(:title).all
@conferences_available = Conference.with_roles([:admin, :organizer, :cfp], current_user)
end
end
end