added buildings data for frontentd

This commit is contained in:
Harry Bomrah 2015-09-25 15:21:32 +08:00
parent 4e630a135f
commit 0489045aee
1 changed files with 10 additions and 1 deletions

View File

@ -1,8 +1,17 @@
class SpacesController < ApplicationController class SpacesController < ApplicationController
def index def index
buildings = Building.all.collect do |building|
{
"building-title" => building.title,
"building-image" => building.image.url,
"alt-title" => building.title
}
end
{ {
"buildings" => buildings,
"extra" => { "extra" => {
} }
} }
end end