added statuses to the links and also context
This commit is contained in:
parent
3119d17b44
commit
4a50726150
|
@ -3,8 +3,16 @@ class WebResourcesController < ApplicationController
|
||||||
def index
|
def index
|
||||||
links = WebLink.order_by(:created_at=>'desc')
|
links = WebLink.order_by(:created_at=>'desc')
|
||||||
web_link = links.collect do |link|
|
web_link = links.collect do |link|
|
||||||
|
statuses = link.statuses.collect do |status|
|
||||||
|
{
|
||||||
|
"status" => status,
|
||||||
|
"status-class" => "status-#{status.downcase}"
|
||||||
|
}
|
||||||
|
end
|
||||||
{
|
{
|
||||||
"title" => link.title,
|
"title" => link.title,
|
||||||
|
"context" => link.context,
|
||||||
|
"statuses" => statuses,
|
||||||
"link_to_show" => link.url
|
"link_to_show" => link.url
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue