Support Ruby 2.4.

This commit is contained in:
Guo Xiang Tan
2017-04-15 12:11:02 +08:00
parent 86efc57390
commit 04016f0dec
29 changed files with 73 additions and 60 deletions

View File

@ -1,7 +1,7 @@
class DraftSequence < ActiveRecord::Base
def self.next!(user,key)
user_id = user
user_id = user.id unless user.class == Fixnum
user_id = user.id unless user.is_a?(Integer)
return 0 if user_id < 0
@ -19,7 +19,7 @@ class DraftSequence < ActiveRecord::Base
return nil unless user
user_id = user
user_id = user.id unless user.class == Fixnum
user_id = user.id unless user.is_a?(Integer)
# perf critical path
r = exec_sql('select sequence from draft_sequences where user_id = ? and draft_key = ?', user_id, key).values