Class: Crowdblog::User

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

Instance Method Summary collapse

Instance Method Details

#is_publisher?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/models/crowdblog/user.rb', line 12

def is_publisher?
  true
end

#last_post_atObject



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

def last_post_at
  last_post.try(:published_at)
end

#last_published_atObject



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

def last_published_at
  published_posts.first ? published_posts.first.published_at : nil
end