WIP changed CommentsController#index; temporary view for all_comments

This commit is contained in:
raluka 2015-09-07 18:56:26 +02:00
parent 7ba3cfd473
commit 1addae9cd9
6 changed files with 15 additions and 54 deletions

View file

@ -12,7 +12,7 @@ class User < ActiveRecord::Base
before_create :setup_role
# add scope
scope :comment_notifiable, ->(conference) {joins(:roles).where('roles.name IN (?)', [:organizer, :cfp]).where('roles.resource_id = ?', conference.id)}
scope :comment_notifiable, ->(conference) {joins(:roles).where('roles.name IN (?)', [:organizer, :cfp]).where('roles.resource_type = ? AND roles.resource_id = ?', 'Conference', conference.id)}
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,