aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/CHANGELOG.md17
-rw-r--r--activerecord/lib/active_record/associations/collection_proxy.rb2
2 files changed, 17 insertions, 2 deletions
diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md
index 9fb914ac40..838e9fcbfb 100644
--- a/actionpack/CHANGELOG.md
+++ b/actionpack/CHANGELOG.md
@@ -1,6 +1,21 @@
+* Make assets helpers work in the controllers like it works in the views.
+
+ Example:
+
+ # config/application.rb
+ config.asset_host = 'http://mycdn.com'
+
+ ActionController::Base.helpers.asset_path('fallback.png')
+ # => http://mycdn.com/assets/fallback.png
+
+ Fixes #10051.
+
+ *Tima Maslyuchenko*
+
* Respect `SCRIPT_NAME` when using `redirect` with a relative path
Example:
+
# application routes.rb
mount BlogEngine => '/blog'
@@ -12,7 +27,7 @@
the path. It also allows redirects to work where the application is deployed to a
subdirectory of a website.
- Fixes #7977
+ Fixes #7977.
*Andrew White*
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb
index 0b6cdf5217..2e70a07962 100644
--- a/activerecord/lib/active_record/associations/collection_proxy.rb
+++ b/activerecord/lib/active_record/associations/collection_proxy.rb
@@ -281,7 +281,7 @@ module ActiveRecord
# so method calls may be chained.
#
# class Person < ActiveRecord::Base
- # pets :has_many
+ # has_many :pets
# end
#
# person.pets.size # => 0