Sha256: c8526f5d41461d1563a3e43d42e35015fad185f8bb44a5f0e731a9cd5c1fac4c
Contents?: true
Size: 308 Bytes
Versions: 159
Compression:
Stored size: 308 Bytes
Contents
module Fields::BooleanSupport extend ActiveSupport::Concern def assign_boolean(strong_params, attribute) attribute = attribute.to_s if strong_params.dig(attribute).present? strong_params[attribute] = ActiveModel::Type::Boolean.new.cast(strong_params[attribute]) || false end end end
Version data entries
159 entries across 159 versions & 1 rubygems