discourse/app/models/topic_poster.rb

18 lines
324 B
Ruby
Raw Normal View History

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