diff --git a/app/controllers/spaces_controller.rb b/app/controllers/spaces_controller.rb index 7ddf3a3..bd55ad9 100644 --- a/app/controllers/spaces_controller.rb +++ b/app/controllers/spaces_controller.rb @@ -1,8 +1,17 @@ class SpacesController < ApplicationController 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" => { - + } } end