Oh, god, I just saw the best bad SO question ever. It doesn't deserve any upvotes (quite the opposite), but I had to say something, somewhere. stackoverflow.com/questions/43991426/…
Oh, here's a thing: in the @minor_issues loop in the view, you're passing a Result object to the 'issue_severity` method, whereas above, in the major issues loop, you're passing an Issue object
Ok, just checking. Anyway, the only other thing I can think that would be pertinent is, what's inside layouts/_back_button.html.erb? Nothing I've seen so far really suggests what the problem might be.
What exactly do you think issues = results.select{ |issue| issue.issue_id} does? Because all it does is return all elements of results for which issue_id is not nil. Is that what it's supposed to do?
The last line of get_host_issues is a syntactical error: issues = results.select{ |issue| issue.issue_id, at the very least you need a closing } character, but you probably want something more.
The <=> operator would have been useful if you wanted it to always come out sorted biggest-to-smallest no matter how it went in (or smallest to biggest, or any other proper sorting).
Anyway, @WestCoastCharlie, if you're reading this, I know you can't respond, but, from the comments you left clarifying how your method should work for non-sorted arrays, @roychri's answer is good.
I upvoted the question, if you do as well he can chat. We can remove the upvote later if that seems necessary (it always seemed weird to me that there's any threshold at all for this feature, though I guess it helps with spam?)