Skip to content

Commit

Permalink
Remove "boosts" to start over
Browse files Browse the repository at this point in the history
We started implementing this feature over half a year ago, and had to
stop work on it to pursue other priorities.

This removes the in-progress work so that:
- users don't see non-functional UI, and
- we can start again with a more suitable approach now that we've had
  more time to reflect on it, and more experience running Search API v2
  in production
  • Loading branch information
csutter committed Jan 10, 2025
1 parent d7f6c92 commit b806109
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 535 deletions.
51 changes: 0 additions & 51 deletions app/controllers/boosts_controller.rb

This file was deleted.

5 changes: 0 additions & 5 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ def navigation_items
href: recommended_links_path,
active: controller.controller_name == "recommended_links",
},
{
text: "Boosts",
href: boosts_path,
active: controller.controller_name == "boosts",
},
{
text: current_user.name,
href: Plek.new.external_url_for("signon"),
Expand Down
13 changes: 0 additions & 13 deletions app/helpers/boosts_helper.rb

This file was deleted.

6 changes: 0 additions & 6 deletions app/models/boost.rb

This file was deleted.

59 changes: 0 additions & 59 deletions app/views/boosts/_form.html.erb

This file was deleted.

19 changes: 0 additions & 19 deletions app/views/boosts/edit.html.erb

This file was deleted.

30 changes: 0 additions & 30 deletions app/views/boosts/index.html.erb

This file was deleted.

15 changes: 0 additions & 15 deletions app/views/boosts/new.html.erb

This file was deleted.

47 changes: 0 additions & 47 deletions app/views/boosts/show.html.erb

This file was deleted.

7 changes: 0 additions & 7 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,3 @@
en:
activerecord:
attributes:
boost:
name: Name
active: Activate boost
boost_amount: Boost amount
filter: Filter expression
created_at: Created
updated_at: Updated
1 change: 0 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
)
mount GovukPublishingComponents::Engine, at: "/component-guide" if Rails.env.development?

resources :boosts
resources :recommended_links, path: "/recommended-links"

root "recommended_links#index"
Expand Down
12 changes: 12 additions & 0 deletions db/migrate/20250110114733_remove_boosts.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class RemoveBoosts < ActiveRecord::Migration[8.0]
def change
drop_table :boosts do |t|
t.string :name, null: false
t.boolean :active, null: false
t.float :boost_amount, null: false
t.text :filter, null: false

t.timestamps
end
end
end
12 changes: 1 addition & 11 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_06_19_100722) do
create_table "boosts", charset: "utf8mb3", force: :cascade do |t|
t.string "name", null: false
t.boolean "active", null: false
t.float "boost_amount", null: false
t.text "filter", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

ActiveRecord::Schema[8.0].define(version: 2025_01_10_114733) do
create_table "recommended_links", charset: "utf8mb3", force: :cascade do |t|
t.string "title"
t.string "link"
Expand All @@ -42,5 +33,4 @@
t.boolean "disabled", default: false
t.string "organisation_content_id"
end

end
7 changes: 0 additions & 7 deletions spec/factories.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FactoryBot.define do
factory :boost do
name { "Boost" }
active { true }
boost_amount { 0.5 }
filter { 'document_type: ANY("press_release")' }
end

factory :recommended_link do
title { "Tax online" }
link { "https://www.tax.service.gov.uk/" }
Expand Down
64 changes: 0 additions & 64 deletions spec/models/boost_spec.rb

This file was deleted.

Loading

0 comments on commit b806109

Please sign in to comment.