discourse/app/models/topic_poster.rb

20 lines
339 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
class TopicPoster < OpenStruct
include ActiveModel::Serialization
attr_accessor :user, :description, :extras, :id
def attributes
{
'user' => user,
'description' => description,
'extras' => extras,
'id' => id
}
2013-02-06 03:16:51 +08:00
end
# TODO: Remove when old list is removed
def [](attr)
send(attr)
end
end