discourse/app/models/topic_poster.rb

18 lines
324 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
2013-02-07 23:45:24 +08:00
{'user' => user,
'description' => description,
2013-02-06 03:16:51 +08:00
'extras' => extras,
'id' => id}
end
# TODO: Remove when old list is removed
def [](attr)
send(attr)
end
end