diff options
| -rw-r--r-- | app/controllers/things_controller.rb | 4 | ||||
| -rw-r--r-- | app/models/thing.rb | 1 | ||||
| -rw-r--r-- | app/views/things/_form.html.erb | 5 | ||||
| -rw-r--r-- | config/locales/ca.yml | 1 | ||||
| -rw-r--r-- | config/locales/en.yml | 1 | ||||
| -rw-r--r-- | db/migrate/20240314211609_drop_location_column.rb | 5 | ||||
| -rw-r--r-- | db/schema.rb | 3 | ||||
| -rw-r--r-- | test/fixtures/things.yml | 2 |
8 files changed, 8 insertions, 14 deletions
diff --git a/app/controllers/things_controller.rb b/app/controllers/things_controller.rb index 450b409..e994a3d 100644 --- a/app/controllers/things_controller.rb +++ b/app/controllers/things_controller.rb @@ -63,7 +63,7 @@ class ThingsController < ApplicationController def thing_params params.require(:thing).permit(:target, :title, :publisher, :address, :year, :url, :access, - :authors, :location, :insideof, :pages, :rate, :status, :kind, - :bought_at, :editors, :note, :where_is_it, tag_ids: []) + :authors, :insideof, :pages, :rate, :status, :kind, :bought_at, + :editors, :note, :where_is_it, tag_ids: []) end end diff --git a/app/models/thing.rb b/app/models/thing.rb index 5c758fb..1f1e4e4 100644 --- a/app/models/thing.rb +++ b/app/models/thing.rb @@ -23,7 +23,6 @@ class Thing < ApplicationRecord .or(where('publisher LIKE ?', "%#{text}%")) .or(where('address LIKE ?', "%#{text}%")) .or(where('url LIKE ?', "%#{text}%")) - .or(where('location LIKE ?', "%#{text}%")) .or(where('insideof LIKE ?', "%#{text}%")) .or(where('pages LIKE ?', "%#{text}%")) .or(where('note LIKE ?', "%#{text}%")) diff --git a/app/views/things/_form.html.erb b/app/views/things/_form.html.erb index da90302..0569cc4 100644 --- a/app/views/things/_form.html.erb +++ b/app/views/things/_form.html.erb @@ -50,11 +50,6 @@ </div> <div> - <%= form.label :location %> - <%= form.text_field :location %> - </div> - - <div> <%= form.label :insideof %> <%= form.text_field :insideof %> </div> diff --git a/config/locales/ca.yml b/config/locales/ca.yml index 0e293b4..15a110d 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -20,7 +20,6 @@ ca: year: Any url: Enllaç access: Última data de consulta - location: Lloc insideof: Dins de pages: Pàgines rate: Qualificació diff --git a/config/locales/en.yml b/config/locales/en.yml index c1b0d07..2209eee 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -20,7 +20,6 @@ en: year: Year url: URL access: Last consulted at - location: Place insideof: Inside of pages: Pages rate: Rate diff --git a/db/migrate/20240314211609_drop_location_column.rb b/db/migrate/20240314211609_drop_location_column.rb new file mode 100644 index 0000000..1afa57f --- /dev/null +++ b/db/migrate/20240314211609_drop_location_column.rb @@ -0,0 +1,5 @@ +class DropLocationColumn < ActiveRecord::Migration[7.1] + def change + remove_column :things, :location + end +end diff --git a/db/schema.rb b/db/schema.rb index 967b074..8726291 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.1].define(version: 2024_03_13_133513) do +ActiveRecord::Schema[7.1].define(version: 2024_03_14_211609) do create_table "action_text_rich_texts", force: :cascade do |t| t.string "name", null: false t.text "body" @@ -94,7 +94,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_03_13_133513) do t.integer "year" t.string "url" t.date "access" - t.string "location" t.string "insideof" t.string "pages" t.integer "user_id", null: false diff --git a/test/fixtures/things.yml b/test/fixtures/things.yml index 069cf85..85a6359 100644 --- a/test/fixtures/things.yml +++ b/test/fixtures/things.yml @@ -7,7 +7,6 @@ thing1: address: year: 2024 url: 'http://example.com' - location: 'Somewhere' insideof: 'Some other thing' pages: '22-24' note: 'This is a note 1' @@ -27,7 +26,6 @@ thing2: address: 'Address 2' year: 2024 url: 'http://example.com' - location: 'Somewhere' insideof: 'Some other thing' pages: '22-24' note: 'This is a note 2' |
