Class: PushType::User

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Customizable
Defined in:
app/models/push_type/user.rb

Instance Method Summary collapse

Methods included from Customizable

#attribute_for_inspect, #fields

Instance Method Details

#initialsObject



11
12
13
14
15
# File 'app/models/push_type/user.rb', line 11

def initials
  chunks = name ? name.split(' ') : []
  chunks.slice!(1..-2)
  chunks.map { |n| n[0] }.join.upcase
end