aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2012-05-27 14:01:44 +0200
committerPiotr Sarnacki <drogus@gmail.com>2012-05-28 06:58:48 +0200
commite4aaac1301ea21d57c0bc986da0c4e274620bdab (patch)
tree07e746e2d14fa31d158722700233d434e342cd06 /guides
parent523d0f09e4cc3ba46d851e2144587df26fdc7603 (diff)
downloadrails-e4aaac1301ea21d57c0bc986da0c4e274620bdab.tar.gz
rails-e4aaac1301ea21d57c0bc986da0c4e274620bdab.tar.bz2
rails-e4aaac1301ea21d57c0bc986da0c4e274620bdab.zip
Fix sorting of helpers from different paths
When more than one directory for helpers is provided to a controller, it should preserver the order of directories. Given 2 paths: MyController.helpers_paths = ["dir1/helpers", "dir2/helpers"] helpers from dir1 should be loaded first. Before this commit, all helpers were mixed and then sorted alphabetically, which essentially would require to rename helpers to get desired order. This is a problem especially for engines, where you would like to be able to predict accurately which engine helpers will load first. (closes #6496)
Diffstat (limited to 'guides')
-rw-r--r--guides/source/upgrading_ruby_on_rails.textile4
1 files changed, 4 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.textile b/guides/source/upgrading_ruby_on_rails.textile
index 02407a5fe8..dcfd252def 100644
--- a/guides/source/upgrading_ruby_on_rails.textile
+++ b/guides/source/upgrading_ruby_on_rails.textile
@@ -46,6 +46,10 @@ h4(#action_pack4_0). ActionPack
Rails 4.0 changed how <tt>assert_generates</tt>, <tt>assert_recognizes</tt>, and <tt>assert_routing</tt> work. Now all these assertions raise <tt>Assertion</tt> instead of <tt>RoutingError</tt>.
+h4(#helpers_order). Helpers loading order
+
+The loading order of helpers from more than one directory has changed in Rails 4.0. Previously, helpers from all directories were gathered and then sorted alphabetically. After upgrade to Rails 4.0 helpers will preserve the order of loaded directories and will be sorted alphabetically only within each directory. Unless you explicitly use <tt>helpers_path</tt> parameter, this change will only impact the way of loading helpers from engines. If you rely on the fact that particular helper from engine loads before or after another helper from application or another engine, you should check if correct methods are available after upgrade. If you would like to change order in which engines are loaded, you can use <tt>config.railties_order=</tt> method.
+
h3. Upgrading from Rails 3.1 to Rails 3.2
If your application is currently on any version of Rails older than 3.1.x, you should upgrade to Rails 3.1 before attempting an update to Rails 3.2.