From 8d64cd86db1bc5e1ad119d13eb14f94726a0765f Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Tue, 2 May 2017 15:37:06 -0400 Subject: Add type caster to `RuntimeReflection#alias_name` Since we have been using this `Arel::Table` since 111ccc832bc977b15af12c14e7ca078dad2d4373, in order to properly handle queries, it's important that we properly type cast arguments. --- activerecord/test/models/book.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/models/book.rb') diff --git a/activerecord/test/models/book.rb b/activerecord/test/models/book.rb index 17bf3fbcb4..5f8a8a96dd 100644 --- a/activerecord/test/models/book.rb +++ b/activerecord/test/models/book.rb @@ -1,5 +1,5 @@ class Book < ActiveRecord::Base - has_many :authors + belongs_to :author has_many :citations, foreign_key: "book1_id" has_many :references, -> { distinct }, through: :citations, source: :reference_of -- cgit v1.2.3