mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 03:30:54 +00:00
fixed issues with NULL category not showing
This commit is contained in:
parent
9312a90585
commit
784c5832cf
2 changed files with 5 additions and 4 deletions
|
@ -13,10 +13,11 @@ class IssuesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
allowed = Issue::allowed_categories cuser
|
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
|
@open = Issue.where(qstring, allowed).with_status(Issue::STATUS_OPEN).all order: sort
|
||||||
@solved = Issue.where(category_id: allowed).with_status(Issue::STATUS_SOLVED).all order: sort
|
@solved = Issue.where(qstring, allowed).with_status(Issue::STATUS_SOLVED).all order: sort
|
||||||
@rejected = Issue.where(category_id: allowed).with_status(Issue::STATUS_REJECTED).all order: sort
|
@rejected = Issue.where(qstring, allowed).with_status(Issue::STATUS_REJECTED).all order: sort
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Issue < ActiveRecord::Base
|
||||||
CATEGORY_WEBSITE = 17
|
CATEGORY_WEBSITE = 17
|
||||||
CATEGORY_NSLPLUGIN = 20
|
CATEGORY_NSLPLUGIN = 20
|
||||||
CATEGORY_LEAGUE = 22
|
CATEGORY_LEAGUE = 22
|
||||||
CATEGORY_GATHER = 52
|
CATEGORY_GATHER = 54
|
||||||
|
|
||||||
attr_accessor :assigned_name
|
attr_accessor :assigned_name
|
||||||
attr_protected :id, :created_at, :updated_at
|
attr_protected :id, :created_at, :updated_at
|
||||||
|
|
Loading…
Reference in a new issue