Skip to content

Commit

Permalink
fix migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVajnagi committed Nov 19, 2024
1 parent 56892f5 commit b1bb9aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions app/models/calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20221024174044_fix_calculator_creation.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b1bb9aa

Please sign in to comment.