However when I remove turbo-sprockets from the Gemfile, that is, using the default
rails 3 asset compilation pipeline, I get the exact content I was expecting:
I guess it's a bug on turbo-sprockets-rails3 as using it shouldnt affect the way assets get copied/compiled to public/assets with default rails. IMHO turbo-sprockets should only aid on doing it faster, at least that's why I added it to my Gemfile.
if File.basename(logical_path)[/[^\.]+/, 0] == 'index'
logical_path.sub!(/\/index\./, '.')
end
I however do not understand why you'd remove the "index." part from the filename, files should be processed and reflect the source they are compiled from, just like default rails does, without causing this unexpected behaviour i'm reporting. Same happens with javascript files.
Hey I guess I found a bug, on turbo-sprockets-rails3 output working differently on what default rails 3 does.
I created a very simple rails app with the following css files in it:
When using the latest turbo-sprockets-rails3, the file placed under
public/assets/home.css
has the wrong content (that from the home/index.css):However when I remove turbo-sprockets from the Gemfile, that is, using the default rails 3 asset compilation pipeline, I get the exact content I was expecting:
I guess it's a bug on turbo-sprockets-rails3 as using it shouldnt affect the way assets get copied/compiled to public/assets with default rails. IMHO turbo-sprockets should only aid on doing it faster, at least that's why I added it to my Gemfile.
I tracked the error down to line: https://github.com/ndbroadbent/turbo-sprockets-rails3/blob/master/lib/sprockets/static_non_digest_generator.rb#L31
from commit: https://github.com/ndbroadbent/turbo-sprockets-rails3/commit/dfd94211c0433b2a89bd9d9ef89ecc14d2aa354e
I however do not understand why you'd remove the "index." part from the filename, files should be processed and reflect the source they are compiled from, just like default rails does, without causing this unexpected behaviour i'm reporting. Same happens with javascript files.
Any ideas on why was that line added?