diff --git a/app/views/server/blocks/index.html.erb b/app/views/server/blocks/index.html.erb index ce205347c86a287a432483c22f51c0fef23343ee..e4c4deb8970ac3369e70e2894651bb031fefac6b 100644 --- a/app/views/server/blocks/index.html.erb +++ b/app/views/server/blocks/index.html.erb @@ -9,7 +9,7 @@ </tr> </thead> <tbody> - <% block.templates.each do |template| %> + <% @templates.each do |template| %> <tr> <td><%= link_to t("enums.communication.block.template_kind.#{template}"), server_block_path(template) %></td> <td><%= Communication::Block.send(template).count %></td> diff --git a/db/schema.rb b/db/schema.rb index 711ce937eb7340bb171cb48803255914f1f470b4..e4fe4db68c63e33e43d5f4b835d904648853e699 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2023_05_02_074432) do +ActiveRecord::Schema[7.0].define(version: 2023_06_14_062545) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -1048,6 +1048,16 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_02_074432) do t.index ["university_id"], name: "index_university_roles_on_university_id" end + create_table "user_favorites", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t| + t.uuid "user_id", null: false + t.string "about_type", null: false + t.uuid "about_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["about_type", "about_id"], name: "index_user_favorites_on_about" + t.index ["user_id"], name: "index_user_favorites_on_user_id" + end + create_table "users", id: :uuid, default: -> { "public.gen_random_uuid()" }, force: :cascade do |t| t.uuid "university_id", null: false t.string "first_name" @@ -1214,6 +1224,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_02_074432) do add_foreign_key "university_person_involvements", "universities" add_foreign_key "university_person_involvements", "university_people", column: "person_id" add_foreign_key "university_roles", "universities" + add_foreign_key "user_favorites", "users" add_foreign_key "users", "languages" add_foreign_key "users", "universities" end