Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/views/shared/_sponsor.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.col-4.col-md-3.col-lg-2.mt-4.d-flex.justify-content-center
= link_to image_tag(sponsor.avatar.url, alt: sponsor.name, class: 'small-image mw-100'), sponsor.website, title: sponsor.name, class: 'border-0 mw-100'
4 changes: 1 addition & 3 deletions app/views/shared/_sponsors.html.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.row.d-flex.align-items-center.justify-content-center
- sponsors.each do |sponsor|
.col-4.col-md-3.col-lg-2.mt-4.d-flex.justify-content-center
= link_to image_tag(sponsor.avatar.url, alt: sponsor.name, class: 'small-image mw-100'), sponsor.website, title: sponsor.name, class: 'border-0 mw-100'
= render partial: 'shared/sponsor', collection: sponsors, as: :sponsor, cached: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class AddIndexesToSponsorsForActiveAndSearch < ActiveRecord::Migration[8.1]
disable_ddl_transaction!

def change
add_index :sponsors, :updated_at,
order: { updated_at: :desc },
where: 'level <> 0',
algorithm: :concurrently,
if_not_exists: true

add_index :sponsors, 'lower(name)',
algorithm: :concurrently,
if_not_exists: true
end
end
4 changes: 3 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.1].define(version: 2026_08_06_000000) do
ActiveRecord::Schema[8.1].define(version: 2026_08_10_091618) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"

Expand Down Expand Up @@ -512,6 +512,8 @@
t.integer "seats", default: 15
t.datetime "updated_at", precision: nil
t.string "website"
t.index "lower((name)::text)", name: "index_sponsors_on_lower_name"
t.index ["updated_at"], name: "index_sponsors_on_updated_at", order: :desc, where: "(level <> 0)"
end

create_table "sponsorships", id: :serial, force: :cascade do |t|
Expand Down