Permalink
Browse files

Make this shit legit

  • Loading branch information...
1 parent 78f4cc2 commit e66eabb6931d0032553df6a3ccee07adf87adc18 @bpot committed Sep 16, 2011
Showing with 9 additions and 1 deletion.
  1. +9 −1 app/controllers/beers_controller.rb
@@ -1,6 +1,14 @@
class BeersController < ApplicationController
+ BEERS_BOB_LIKES = ["Lone Star", "Pabst Blue Ribbon", "St. Thomas Inquisition Special"]
+
def index
- @beers = Beer.all.sort_by { |beer| -beer.points }
+ @beers = Beer.all.sort_by do |beer|
+ if BEERS_BOB_LIKES.include?(beer.name)
+ -1
+ else
+ -beer.points
+ end
+ end
end
def new

1 comment on commit e66eabb

@hoonpark

Why can't I like a commit?

Please sign in to comment.