解决ruby2.3执行sql出错的bug
This commit is contained in:
parent
fc38ef6a3f
commit
a1d3bbbfa9
|
@ -1,5 +1,15 @@
|
|||
#coding=utf-8
|
||||
#
|
||||
require 'active_record'
|
||||
|
||||
## ruby2.3在这个rails版本的activerecord有bug, 直接用respond_to?(:to_proc)作判断
|
||||
#而ruby2.3中hash可以返回 to_proc
|
||||
if RUBY_VERSION > '2.3' && Rails.version < '3.2.22.3'
|
||||
Hash.class_eval do
|
||||
remove_method :to_proc
|
||||
end
|
||||
end
|
||||
|
||||
module ActiveRecord
|
||||
class Base
|
||||
include Redmine::I18n
|
||||
|
|
Loading…
Reference in New Issue