Skip to content

Commit

Permalink
Make this shit legit
Browse files Browse the repository at this point in the history
  • Loading branch information
bpot committed Sep 16, 2011
1 parent 78f4cc2 commit e66eabb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion 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
Expand Down

1 comment on commit e66eabb

@hoonpark
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't I like a commit?

Please sign in to comment.