Class: Workarea::Admin::CommentViewModel
- Inherits:
-
ApplicationViewModel
- Object
- ApplicationViewModel
- Workarea::Admin::CommentViewModel
- Defined in:
- app/view_models/workarea/admin/comment_view_model.rb
Instance Method Summary collapse
Instance Method Details
#author ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/view_models/workarea/admin/comment_view_model.rb', line 4 def return @author if defined?(@author) @author = if model = User.where(id: ).first UserViewModel.new(model) end end |
#author_name ⇒ Object
12 13 14 15 |
# File 'app/view_models/workarea/admin/comment_view_model.rb', line 12 def return '' unless .present? .name end |