diff options
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index baf33e2d37..a4748dbeda 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -81,7 +81,9 @@ module ActiveRecord alias :in_use? :owner def self.type_cast_config_to_integer(config) - if SIMPLE_INT.match?(config) + if config.is_a?(Integer) + config + elsif SIMPLE_INT.match?(config) config.to_i else config |