To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / news / index.api.rsb @ 1531:ae8145b28b2b
History | View | Annotate | Download (512 Bytes)
| 1 |
api.array :news, api_meta(:total_count => @news_count, :offset => @offset, :limit => @limit) do |
|---|---|
| 2 |
@newss.each do |news| |
| 3 |
api.news do |
| 4 |
api.id news.id |
| 5 |
api.project(:id => news.project_id, :name => news.project.name) unless news.project.nil? |
| 6 |
api.author(:id => news.author_id, :name => news.author.name) unless news.author.nil? |
| 7 |
|
| 8 |
api.title news.title |
| 9 |
api.summary news.summary |
| 10 |
api.description news.description |
| 11 |
api.created_on news.created_on |
| 12 |
end |
| 13 |
end |
| 14 |
end |