This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
discourse/app/serializers/version_serializer.rb

22 lines
423 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
class VersionSerializer < ApplicationSerializer
attributes :number, :display_username, :created_at, :description
def number
object[:number]
end
def display_username
object[:display_username]
end
def created_at
object[:created_at]
end
def description
"v#{object[:number]} - #{FreedomPatches::Rails4.time_ago_in_words(object[:created_at])} ago by #{object[:display_username]}"
end
end