Sha256: 731ba41a6bea842a160ceeedb290f6698a61fa44974202d726bb9f4c539b22f0
Contents?: true
Size: 301 Bytes
Versions: 28
Compression:
Stored size: 301 Bytes
Contents
class MemberNumberGenerator def self.next_number_for(organization) next_number = organization.last_member_number + 1 organization.update_column(:last_member_number, next_number) padded_number = "%05d" % next_number member_number = organization.id.to_s + "A" + padded_number end end
Version data entries
28 entries across 28 versions & 1 rubygems