socialforge/app/views/contestnotifications/index.api.rsb

15 lines
771 B
Plaintext

api.array :contestnotifications, api_meta(:total_count => @contestnotifications_count, :offset => @offset, :limit => @limit) do
@contestnotificationss.each do |contestnotifications|
api.contestnotifications do
api.id contestnotifications.id
api.contest(:id => contestnotifications.contest_id, :name => contestnotifications.contest.name) unless contestnotifications.contest.nil?
api.author(:id => contestnotifications.author_id, :name => contestnotifications.author.name) unless contestnotifications.author.nil?
api.title contestnotifications.title
api.summary contestnotifications.summary
api.description contestnotifications.description
api.created_at contestnotifications.created_at
end
end
end