Skip to content

Commit 725651e

Browse files
authored
Merge pull request #1181 from hatchloyalty/pr-class-name-constant
Do not pass a constant to belongs_to option class_name
2 parents f30a12f + 26c068b commit 725651e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/fixtures/active_record.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,8 @@ class Thing < ActiveRecord::Base
641641
end
642642

643643
class RelatedThing < ActiveRecord::Base
644-
belongs_to :from, class_name: Thing, foreign_key: :from_id
645-
belongs_to :to, class_name: Thing, foreign_key: :to_id
644+
belongs_to :from, class_name: "Thing", foreign_key: :from_id
645+
belongs_to :to, class_name: "Thing", foreign_key: :to_id
646646
end
647647

648648
class Question < ActiveRecord::Base

0 commit comments

Comments
 (0)