Class: Crowdblog::User
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Crowdblog::User
- Includes:
- Gravtastic
- Defined in:
- app/models/crowdblog/user.rb
Instance Method Summary collapse
-
#gravatar_email ⇒ Object
INSTANCE METHODS.
- #last_post_at ⇒ Object
- #publisher! ⇒ Object
- #to_param ⇒ Object
Instance Method Details
#gravatar_email ⇒ Object
INSTANCE METHODS
13 14 15 |
# File 'app/models/crowdblog/user.rb', line 13 def gravatar_email gravatar_alias || email end |
#last_post_at ⇒ Object
17 18 19 |
# File 'app/models/crowdblog/user.rb', line 17 def last_post_at last_post.try(:published_at) end |
#publisher! ⇒ Object
21 22 23 |
# File 'app/models/crowdblog/user.rb', line 21 def publisher! update_attribute(:is_publisher, true) end |
#to_param ⇒ Object
25 26 27 |
# File 'app/models/crowdblog/user.rb', line 25 def to_param [email.split('@').first] end |