WIP changed CommentsController#index; temporary view for all_comments
This commit is contained in:
parent
7ba3cfd473
commit
1addae9cd9
6 changed files with 15 additions and 54 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue