aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-28 13:41:29 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-11-28 13:41:29 -0800
commite9df07870fc16eaefbff60e0e80921489eefcd91 (patch)
tree5d026b585b76937689e9834f8cf7df99aaa13e16 /activerecord/lib/active_record
parent4c99d0870c87e136b257e03fffdfc5f86c60ff34 (diff)
parent22df38ca3306684033039fd0bc20b1025f4f8e2a (diff)
downloadrails-e9df07870fc16eaefbff60e0e80921489eefcd91.tar.gz
rails-e9df07870fc16eaefbff60e0e80921489eefcd91.tar.bz2
rails-e9df07870fc16eaefbff60e0e80921489eefcd91.zip
Merge pull request #8355 from steveklabnik/update_7418
Ensure that associations have a symbol argument.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/associations/builder/association.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb
index 1df876bf62..5c37f42794 100644
--- a/activerecord/lib/active_record/associations/builder/association.rb
+++ b/activerecord/lib/active_record/associations/builder/association.rb
@@ -13,6 +13,8 @@ module ActiveRecord::Associations::Builder
end
def initialize(model, name, scope, options)
+ raise ArgumentError, "association names must be a Symbol" unless name.kind_of?(Symbol)
+
@model = model
@name = name