Comparing values in switch
===

Using Rails 3, but I guess doesn't matter. I put this in the template helper.

It always goes to the last case `badge-warning` when I for whatever value I put for `rating`, such as `rating_badge(4)`:

      def rating_badge(rating)
        case rating
        when rating > 3
          'badge-success'
        when rating < 3
          'badge-important'
        else
          'badge-warning'
        end
      end

What went wrong?