Sha256: b01f561f9515ac58189a1eca0623415d324ca805b7b278085db2b6dd5a616316
Contents?: true
Size: 356 Bytes
Versions: 6
Compression:
Stored size: 356 Bytes
Contents
module PandaPal module MiscHelper MigrationClass = Rails.version < '5.0' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2] def self.to_boolean(v) if Rails.version < '5.0' ActiveRecord::Type::Boolean.new.type_cast_from_user("0") else ActiveRecord::Type::Boolean.new.deserialize('0') end end end end
Version data entries
6 entries across 6 versions & 1 rubygems