Browse files

use Rails.root.join for assets guide

  • Loading branch information...
1 parent b992f52 commit 9e5b4f359f5508cd322fe8fb2f827d8463438e86 @nickrivadeneira nickrivadeneira committed with vijaydev Oct 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 railties/guides/source/asset_pipeline.textile
@@ -120,7 +120,7 @@ All subdirectories that exist within these three locations are added to the sear
You can add additional (fully qualified) paths to the pipeline in +config/application.rb+. For example:
-config.assets.paths << "#{Rails.root}/app/assets/flash"
+config.assets.paths << Rails.root.join("app", "assets", "flash")
h4. Coding Links to Assets

2 comments on commit 9e5b4f3


fxn replied Oct 7, 2011

Can you elaborate a bit please?

The default config.assets.paths has strings, pushing a pathname to a collection of strings does not seem natural to me.

On the other hand, join-like path constructors are needed in other platforms, but you know forward slashes are portable in Ruby. Interpolated strings read better for my taste.


qrush replied Oct 7, 2011

The split between string paths and Pathname's drives me absolutely batty. Either we should use one or the other, not both. I prefer proper Pathnames, but honestly, I just want it to be consistent.

Please sign in to comment.