From 1ad0a5363bcf44da9ed51e30c5c47a83c3516c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ku=C5=BAma?= Date: Wed, 21 Dec 2011 15:28:24 +0100 Subject: added failing tests for has_many, has_one and belongs_to associations with strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051 --- activerecord/lib/active_record/associations/association.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb index 861dda618a..7887d59aad 100644 --- a/activerecord/lib/active_record/associations/association.rb +++ b/activerecord/lib/active_record/associations/association.rb @@ -230,13 +230,8 @@ module ActiveRecord end def build_record(attributes, options) - attributes = (attributes || {}).reverse_merge(creation_attributes) - reflection.build_association(attributes, options) do |record| - record.assign_attributes( - create_scope.except(*record.changed), - :without_protection => true - ) + record.assign_attributes(create_scope.except(*record.changed), :without_protection => true) end end end -- cgit v1.2.3 From 3afeb6b39b9e36e3edb3bf02d111b6c61e04a795 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 21 Dec 2011 14:15:13 -0700 Subject: DeprecatedUnderscoreRead does not exist anymore --- activerecord/lib/active_record.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 2463f3951f..77971973f6 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -105,7 +105,6 @@ module ActiveRecord autoload :TimeZoneConversion autoload :Write autoload :Serialization - autoload :DeprecatedUnderscoreRead end end -- cgit v1.2.3 From 5662ea511225b34d3b533d03614c496c007215b0 Mon Sep 17 00:00:00 2001 From: "Juan M. Cuello" Date: Wed, 21 Dec 2011 17:00:25 -0300 Subject: Reset postgreSQL search path in db:test:clone_structure. This patch resets the postgres search path in the structure.sql after the structure is dumped in order to find schema_migrations table when multiples schemas are used. Fixes #945 --- activerecord/lib/active_record/railties/databases.rake | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 199eee4359..482901f23f 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -387,6 +387,7 @@ db_namespace = namespace :db do end `pg_dump -i -s -x -O -f #{filename} #{search_path} #{abcs[Rails.env]['database']}` raise 'Error dumping database' if $?.exitstatus == 1 + File.open(filename, "a") { |f| f << "SET search_path TO #{ActiveRecord::Base.connection.schema_search_path};\n\n" } when /sqlite/ dbfile = abcs[Rails.env]['database'] `sqlite3 #{dbfile} .schema > #{filename}` -- cgit v1.2.3