12 13 14
# File 'app/models/page_role.rb', line 12 def viewable_page_ids_for(user) PageRole.viewable_by(user).select(:page_id).map(&:page_id) - PageRole.not_viewable_by(user).select(:page_id).map(&:page_id) end