1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/translation.rb
Dorian Marié 61ea3c286d Fix error when saving an association with a relation named record
ArgumentError: wrong number of arguments (given 3, expected 0)
    /Users/dorianmariefr/.rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-7.0.1/lib/active_record/associations/builder/belongs_to.rb:132:in `record_changed?'
    /Users/dorianmariefr/.rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/activerecord-7.0.1/lib/active_record/autosave_association.rb:450:in `save_has_one_association'
2022-01-17 21:46:54 +01:00

9 lines
220 B
Ruby

# frozen_string_literal: true
class Translation < ActiveRecord::Base
belongs_to :attachment, optional: true
validates :locale, presence: true
validates :key, presence: true
validates :value, presence: true
end