Sha256: faf0cded4e18fac382d59653b9023e823d3cc0087940f21f5d2bb1e342cae006
Contents?: true
Size: 430 Bytes
Versions: 31
Compression:
Stored size: 430 Bytes
Contents
class ShopCustomer < User include Users::Models::User::Scoped def first_name name = '' names = self.name.split(' ') if names.length > 1 name = names[0, names.length-1].join(' ') else name = names.join(' ') end name end def last_name name = '' names = self.name.split(' ') if names.length > 1 name = names[-1] end name end end
Version data entries
31 entries across 31 versions & 1 rubygems