aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/CHANGELOG.md4
-rw-r--r--activerecord/lib/active_record/fixtures.rb2
-rw-r--r--activerecord/test/cases/fixtures_test.rb2
-rw-r--r--guides/source/i18n.md2
4 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index b79b9a87c6..9041f9d33b 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -2,8 +2,8 @@
*Paul Nikitochkin*
-* Fix PredicateBuilder so polymorhic association keys in `where` clause can
- also accept not only `ActiveRecord::Base` direct descendances (decorated
+* Fix PredicateBuilder so polymorphic association keys in `where` clause can
+ accept objects other than direct descendants of `ActiveRecord::Base` (decorated
models, for example).
*Mikhail Dieterle*
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index 6780e309f2..65648d82af 100644
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -479,7 +479,7 @@ module ActiveRecord
fixture_sets = files_to_read.map do |fs_name|
klass = class_names[fs_name]
- conn = klass ? klass.connection : connection
+ conn = klass.respond_to?(:connection) ? klass.connection : connection
fixtures_map[fs_name] = new( # ActiveRecord::FixtureSet.new
conn,
fs_name,
diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb
index 22eeb5076c..76516ef92d 100644
--- a/activerecord/test/cases/fixtures_test.rb
+++ b/activerecord/test/cases/fixtures_test.rb
@@ -78,7 +78,7 @@ class FixturesTest < ActiveRecord::TestCase
end
def test_create_symbol_fixtures
- fixtures = ActiveRecord::FixtureSet.create_fixtures(FIXTURES_ROOT, :collections, :collections => Course) { Course.connection }
+ fixtures = ActiveRecord::FixtureSet.create_fixtures(FIXTURES_ROOT, :collections, :collections => 'Course') { Course.connection }
assert Course.find_by_name('Collection'), 'course is not in the database'
assert fixtures.detect { |f| f.name == 'collections' }, "no fixtures named 'collections' in #{fixtures.map(&:name).inspect}"
diff --git a/guides/source/i18n.md b/guides/source/i18n.md
index cbc2683a00..c191db1df9 100644
--- a/guides/source/i18n.md
+++ b/guides/source/i18n.md
@@ -28,7 +28,7 @@ After reading this guide, you will know:
--------------------------------------------------------------------------------
-NOTE: The Ruby I18n framework provides you with all necessary means for internationalization/localization of your Rails application. You may, however, use any of various plugins and extensions available, which add additional functionality or features. See the Rails [I18n Wiki](http://rails-i18n.org/wiki) for more information.
+NOTE: The Ruby I18n framework provides you with all necessary means for internationalization/localization of your Rails application. You may, however, use any of various plugins and extensions available, which add additional functionality or features. See the Ruby [I18n Wiki](http://ruby-i18n.org/wiki) for more information.
How I18n in Ruby on Rails Works
-------------------------------