Specify translation class name in dummy test class
These tests were failing with Ruby 3.0 because we were getting an error when loading the `translations` association of the dummy class: ``` NameError: uninitialized constant DummyBanner::#<Class:0x000055630e4dccd8>::Translation ``` Specifying the `class_name` of the `translations` association solves the issue.
This commit is contained in:
@@ -58,6 +58,7 @@ describe SkipValidation do
|
|||||||
translates :title, touch: true
|
translates :title, touch: true
|
||||||
translates :description, touch: true
|
translates :description, touch: true
|
||||||
include Globalizable
|
include Globalizable
|
||||||
|
has_many :translations, class_name: "DummyBanner::Translation", foreign_key: "banner_id"
|
||||||
|
|
||||||
validates_translation :title, presence: true
|
validates_translation :title, presence: true
|
||||||
validates_translation :description, presence: true
|
validates_translation :description, presence: true
|
||||||
|
|||||||
Reference in New Issue
Block a user