Sha256: ad008c15b405989393d1c3196790dfc1c82d8d08d0e9a10df0e3be6597222291

Contents?: true

Size: 359 Bytes

Versions: 21

Compression:

Stored size: 359 Bytes

Contents

module CoalescingPanda
  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(v)
      else
        ActiveRecord::Type::Boolean.new.deserialize(v)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
coalescing_panda-5.3.0 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.2 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.2.beta1 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.1 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.0 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.0.beta2 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.2.0.beta1 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.13 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.12 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.11 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.10 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.9 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.8 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.7 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.6 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.5 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.4 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.3.beta.2 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.3.beta.1 lib/coalescing_panda/misc_helper.rb
coalescing_panda-5.1.3 lib/coalescing_panda/misc_helper.rb