Sha256: 9eb7051c830bc9242b397db1b0e17b6cb440b49b26a72be071ab9993778a346f
Contents?: true
Size: 375 Bytes
Versions: 5
Compression:
Stored size: 375 Bytes
Contents
module Ants module Id extend ActiveSupport::Concern def serializable_hash(options={}) attrs = super(options) attrs.each_pair do |k, v| if k.end_with?('_id') attrs[k] = v.to_s end if k.end_with?('_ids') attrs[k] = attrs[k].collect { |id| id.to_s } end end return attrs end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ants-0.3.14 | lib/concerns/ants/id.rb |
ants-0.3.13 | lib/concerns/ants/id.rb |
ants-0.3.12 | lib/concerns/ants/id.rb |
ants-0.3.11 | lib/concerns/ants/id.rb |
ants-0.3.10 | lib/concerns/ants/id.rb |