Sha256: e5646608beef3bc88413beb12b926d9b81c793aa4dd280a822bad7ab2194b59d

Contents?: true

Size: 367 Bytes

Versions: 53

Compression:

Stored size: 367 Bytes

Contents

module PushType
  class User < ActiveRecord::Base

    include PushType::Customizable

    validates :name, presence: true
    validates :email, presence: true, uniqueness: true

    default_scope { order(:name) }

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

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
push_type_core-0.12.1 app/models/push_type/user.rb
push_type_core-0.12.0 app/models/push_type/user.rb
push_type_core-0.12.0.beta.1 app/models/push_type/user.rb
push_type_core-0.11.2 app/models/push_type/user.rb
push_type_core-0.11.1 app/models/push_type/user.rb
push_type_core-0.11.0.beta.2 app/models/push_type/user.rb
push_type_core-0.11.0.beta.1 app/models/push_type/user.rb
push_type_core-0.10.4 app/models/push_type/user.rb
push_type_core-0.10.3 app/models/push_type/user.rb
push_type_core-0.10.2 app/models/push_type/user.rb
push_type_core-0.10.1 app/models/push_type/user.rb
push_type_core-0.10.0 app/models/push_type/user.rb
push_type_core-0.10.0.beta.5 app/models/push_type/user.rb
push_type_core-0.10.0.beta.3 app/models/push_type/user.rb
push_type_core-0.9.5 app/models/push_type/user.rb
push_type_core-0.9.3 app/models/push_type/user.rb
push_type_core-0.9.2 app/models/push_type/user.rb
push_type_core-0.9.1 app/models/push_type/user.rb
push_type_core-0.9.0 app/models/push_type/user.rb
push_type_core-0.9.0.beta.4 app/models/push_type/user.rb