fixed issues with NULL category not showing

This commit is contained in:
Absurdon 2017-07-02 22:48:33 +02:00
parent 9312a90585
commit 784c5832cf
2 changed files with 5 additions and 4 deletions

View file

@ -13,10 +13,11 @@ class IssuesController < ApplicationController
end
allowed = Issue::allowed_categories cuser
qstring = "category_id IN (?) OR category_id IS NULL"
@open = Issue.where(category_id: allowed).with_status(Issue::STATUS_OPEN).all order: sort
@solved = Issue.where(category_id: allowed).with_status(Issue::STATUS_SOLVED).all order: sort
@rejected = Issue.where(category_id: allowed).with_status(Issue::STATUS_REJECTED).all order: sort
@open = Issue.where(qstring, allowed).with_status(Issue::STATUS_OPEN).all order: sort
@solved = Issue.where(qstring, allowed).with_status(Issue::STATUS_SOLVED).all order: sort
@rejected = Issue.where(qstring, allowed).with_status(Issue::STATUS_REJECTED).all order: sort
end
def show

View file

@ -27,7 +27,7 @@ class Issue < ActiveRecord::Base
CATEGORY_WEBSITE = 17
CATEGORY_NSLPLUGIN = 20
CATEGORY_LEAGUE = 22
CATEGORY_GATHER = 52
CATEGORY_GATHER = 54
attr_accessor :assigned_name
attr_protected :id, :created_at, :updated_at