Class: Bbs::ArticleCell
Instance Method Summary
collapse
#method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Bbs::ApplicationCell
Instance Method Details
#article_body ⇒ Object
12
13
14
15
16
|
# File 'app/cells/bbs/article_cell.rb', line 12
def article_body
return body if logged_in? || !Bbs.config.clamp_article_body
body.truncate([body.truncate_words(1).length, Bbs.config.clamp_article_body].min)
end
|
#avatar_url ⇒ Object
22
23
24
|
# File 'app/cells/bbs/article_cell.rb', line 22
def avatar_url
author.profile.avatar.image.url(:medium)
end
|
#nickname ⇒ Object
18
19
20
|
# File 'app/cells/bbs/article_cell.rb', line 18
def nickname
author.profile.nickname
end
|
#show ⇒ Object
8
9
10
|
# File 'app/cells/bbs/article_cell.rb', line 8
def show
render
end
|