Extract method to render special avatars in comments
This commit is contained in:
@@ -4,4 +4,10 @@ class Comments::AvatarComponent < ApplicationComponent
|
||||
def initialize(comment)
|
||||
@comment = comment
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def special_avatar(image_name, options = {})
|
||||
image_tag(image_name, { size: 32, alt: "" }.merge(options))
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user