From b1bb9aa9bbca8f193dfea8f8dec630d5a4a1a719 Mon Sep 17 00:00:00 2001 From: DanielVajnagi <82052651+DanielVajnagi@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:17:08 +0200 Subject: [PATCH] fix migrations --- app/models/calculator.rb | 2 -- db/migrate/20221024174044_fix_calculator_creation.rb | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/models/calculator.rb b/app/models/calculator.rb index 57bd30d2d..05d304683 100644 --- a/app/models/calculator.rb +++ b/app/models/calculator.rb @@ -30,8 +30,6 @@ class Calculator < ApplicationRecord accepts_nested_attributes_for :fields, reject_if: :all_blank, allow_destroy: true accepts_nested_attributes_for :formulas, reject_if: :all_blank, allow_destroy: true - translates :name - scope :ordered_by_name, -> { order(:en_name) } validates :en_name, :uk_name, presence: true diff --git a/db/migrate/20221024174044_fix_calculator_creation.rb b/db/migrate/20221024174044_fix_calculator_creation.rb index 94db0e5bd..094aff904 100644 --- a/db/migrate/20221024174044_fix_calculator_creation.rb +++ b/db/migrate/20221024174044_fix_calculator_creation.rb @@ -1,9 +1,9 @@ class FixCalculatorCreation < ActiveRecord::Migration[7.1] def up - Calculator.create(name: "Diapers Calculator") + # Calculator.create(name: "Diapers Calculator") end def down - Calculator.destroy_by(name: "Diapers Calculator") + # Calculator.destroy_by(name: "Diapers Calculator") end end