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.4.0.beta4 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta3 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta2 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta1 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.13 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.12 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.11 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.10 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.9 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.7 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.6 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.6.beta3 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.6.beta2 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.6.beta1 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.5 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.4 app/lib/panda_pal/misc_helper.rb
panda_pal-5.3.2 app/lib/panda_pal/misc_helper.rb