These are chat archives for fs/rails-base

20th
Feb 2014
Timur Vafin
@timurvafin
Feb 20 2014 14:44

class User < ActiveRecord::Base
devise :database_authenticatable, :registerable, :confirmable,
:recoverable, :rememberable, :trackable, :validatable

validates :full_name, presence: true

def to_s
full_name
end

def full_name_with_email
"#{self[:full_name]} (#{email})"
end
end

```ruby