Class: TopicPoster
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- TopicPoster
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/models/topic_poster.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#extras ⇒ Object
Returns the value of attribute extras.
-
#id ⇒ Object
Returns the value of attribute id.
-
#primary_group ⇒ Object
Returns the value of attribute primary_group.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'app/models/topic_poster.rb', line 6 def description @description end |
#extras ⇒ Object
Returns the value of attribute extras.
6 7 8 |
# File 'app/models/topic_poster.rb', line 6 def extras @extras end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'app/models/topic_poster.rb', line 6 def id @id end |
#primary_group ⇒ Object
Returns the value of attribute primary_group.
6 7 8 |
# File 'app/models/topic_poster.rb', line 6 def primary_group @primary_group end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'app/models/topic_poster.rb', line 6 def user @user end |
Instance Method Details
#attributes ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'app/models/topic_poster.rb', line 8 def attributes { "user" => user, "description" => description, "extras" => extras, "id" => id, "primary_group" => primary_group, } end |
#name_and_description ⇒ Object
18 19 20 |
# File 'app/models/topic_poster.rb', line 18 def name_and_description I18n.t("js.user.avatar.name_and_description", name: user.display_name, description: description) end |