diff --git a/app/controllers/outfits_controller.rb b/app/controllers/outfits_controller.rb index a4e3be17..cfb88b04 100644 --- a/app/controllers/outfits_controller.rb +++ b/app/controllers/outfits_controller.rb @@ -47,7 +47,7 @@ class OutfitsController < ApplicationController end def new - @colors = Color.funny.alphabetical + @colors = Color.alphabetical @species = Species.alphabetical # HACK: Skip this in development, because it's slow! diff --git a/app/models/color.rb b/app/models/color.rb index 8872fc44..d7f23119 100644 --- a/app/models/color.rb +++ b/app/models/color.rb @@ -5,7 +5,6 @@ class Color < ApplicationRecord scope :basic, -> { where(basic: true) } scope :standard, -> { where(standard: true) } scope :nonstandard, -> { where(standard: false) } - scope :funny, -> { order(:prank) unless pranks_funny? } validates :name, presence: true @@ -14,10 +13,10 @@ class Color < ApplicationRecord end def human_name - if prank? && !Color.pranks_funny? - unfunny_human_name + ' ' + I18n.translate('colors.prank_suffix') + if name + name.split(' ').map { |word| word.capitalize }.join(' ') else - unfunny_human_name + I18n.translate('colors.default_human_name') end end @@ -27,14 +26,6 @@ class Color < ApplicationRecord "species_id ASC").first end - def unfunny_human_name - if name - name.split(' ').map { |word| word.capitalize }.join(' ') - else - I18n.translate('colors.default_human_name') - end - end - def default_gender_presentation if name.downcase.ends_with? "boy" :masc @@ -44,9 +35,4 @@ class Color < ApplicationRecord nil end end - - def self.pranks_funny? - now = Time.now.in_time_zone('Pacific Time (US & Canada)') - now.month == 4 && now.day == 1 - end end diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index 6af3cecb..9fca453b 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -34,7 +34,7 @@ %span.error-icon{title: "We haven't seen this item on this pet before."} ⚠️ = select_tag "preview[color_id]", - options_from_collection_for_select(Color.funny.alphabetical, + options_from_collection_for_select(Color.alphabetical, "id", "human_name", @selected_preview_pet_type.color_id) = select_tag "preview[species_id]", options_from_collection_for_select(Species.alphabetical, diff --git a/config/locales/en.yml b/config/locales/en.yml index a9dfb010..3cfd1bd6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -36,7 +36,8 @@ en: blog: Blog contact: Contact email: Questions, comments, bugs - copyright: Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved. + copyright: + Images © 1999–%{year} World of Neopets, Inc. All Rights Reserved. Used With Permission items: @@ -167,8 +168,7 @@ en: submit: Save edit: Edit delete: Delete - delete_confirmation: - Are you sure you want to delete "%{list_name}"? + delete_confirmation: Are you sure you want to delete "%{list_name}"? If you do, we'll delete all the items in it, too. remove_all: confirm: "Remove all items from this list?" @@ -215,7 +215,6 @@ en: colors: default_human_name: (a new color) - prank_suffix: (fake) contributions: contributed_description: diff --git a/db/migrate/20240928022359_remove_prank_from_colors.rb b/db/migrate/20240928022359_remove_prank_from_colors.rb new file mode 100644 index 00000000..2038643f --- /dev/null +++ b/db/migrate/20240928022359_remove_prank_from_colors.rb @@ -0,0 +1,5 @@ +class RemovePrankFromColors < ActiveRecord::Migration[7.2] + def change + remove_column "colors", "prank", :boolean, default: false, null: false + end +end diff --git a/db/openneo_id_schema.rb b/db/openneo_id_schema.rb index 3113d4ff..e6d281a4 100644 --- a/db/openneo_id_schema.rb +++ b/db/openneo_id_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_04_08_120359) do +ActiveRecord::Schema[7.2].define(version: 2024_04_08_120359) do create_table "users", id: { type: :integer, unsigned: true }, charset: "utf8mb3", collation: "utf8mb3_general_ci", force: :cascade do |t| t.string "name", limit: 30, null: false t.string "encrypted_password", limit: 64 @@ -37,5 +37,4 @@ ActiveRecord::Schema[7.1].define(version: 2024_04_08_120359) do t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true end - end diff --git a/db/schema.rb b/db/schema.rb index 2fd7b016..f71890c4 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_06_16_001002) do +ActiveRecord::Schema[7.2].define(version: 2024_09_28_022359) do create_table "alt_styles", charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t| t.integer "species_id", null: false t.integer "color_id", null: false @@ -75,7 +75,6 @@ ActiveRecord::Schema[7.1].define(version: 2024_06_16_001002) do create_table "colors", id: :integer, charset: "utf8mb4", collation: "utf8mb4_unicode_520_ci", force: :cascade do |t| t.boolean "basic" t.boolean "standard" - t.boolean "prank", default: false, null: false t.string "name", null: false t.string "pb_item_name" t.string "pb_item_thumbnail_url"