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.8.4 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.8.3 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.8.2 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.8.1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.8.0 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.12 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.7.0.beta2 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.7.0.beta1 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.11 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.10 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.9 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.8 lib/panda_pal/helpers/misc_helper.rb
panda_pal-5.6.7 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.7.beta2 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.7.beta1 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.6 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.5 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.4 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.3 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.2 app/lib/panda_pal/misc_helper.rb