Sha256: 7fd2196b13c7f2fb7217772b7cd954b57f84f95b942ae83fb5d82af370196ace
Contents?: true
Size: 415 Bytes
Versions: 28
Compression:
Stored size: 415 Bytes
Contents
# frozen_string_literal: true module Decidim module Attributes # Custom attributes value to represent an Integer that is customized from # the parent class to also convert records to their ID representations. class Integer < ActiveModel::Type::Integer private def cast_value(value) return cast_value(value.id) if value.respond_to?(:id) super end end end end
Version data entries
28 entries across 28 versions & 1 rubygems