Class: Crowdblog::User

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

Instance Method Summary collapse

Instance Method Details

#gravatar_emailObject

INSTANCE METHODS



15
16
17
# File 'app/models/crowdblog/user.rb', line 15

def gravatar_email
  gravatar_alias || email
end

#last_post_atObject



19
20
21
# File 'app/models/crowdblog/user.rb', line 19

def last_post_at
  last_post.try(:published_at)
end

#publisher!Object



23
24
25
# File 'app/models/crowdblog/user.rb', line 23

def publisher!
  update_attribute(:is_publisher, true)
end