Sha256: f8f11f33471a7c057364767978b917866f042f37af897ff3cdba5213db6e6c8c

Contents?: true

Size: 352 Bytes

Versions: 77

Compression:

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

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
panda_pal-5.12.7 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.6 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.5 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.4 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.3 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.2 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.12.0 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.11.0 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.10.1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.10.0 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.8.beta1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.7 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.6 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.5 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.4 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.3 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.9.0 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.8.5 lib/panda_pal/helpers/misc_helper.rb