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.6.1 app/lib/panda_pal/misc_helper.rb
panda_pal-5.6.0 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.11 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.10 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.9 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.8 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.7 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.6 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.5 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.4 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.3 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.2 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.1 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta10 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta9 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta8 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta7 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta6 app/lib/panda_pal/misc_helper.rb
panda_pal-5.4.0.beta5 app/lib/panda_pal/misc_helper.rb