# Engine\_javascript and engine\_stylesheet broken

**URL:** <https://www.ruby-forum.com/t/engine-javascript-and-engine-stylesheet-broken/71991>\
**Category:** Engines\
**Created:** [October 13, 2006, 10:06am UTC](https://www.ruby-forum.com/t/engine-javascript-and-engine-stylesheet-broken/71991 "2006-10-13T10:06:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![slain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2acd7d/32.png) [@slain](https://www.ruby-forum.com/u/slain)\
**Post date:** [October 13, 2006, 10:06am UTC](https://www.ruby-forum.com/t/engine-javascript-and-engine-stylesheet-broken/71991/1 "2006-10-13T10:06:12Z")

</div>

engine\_javascript and engine\_stylesheet are broken in that you can’t  
order the stylesheets and javascripts, .css and .js are  
_always_ first, which breaks cascading and javascripts that rely on  
other…

So you have to either do

engine\_stylesheet , ‘basic\_style’, ‘real\_\_style’

or similar…

engine\_stylesheet and engine\_javascriopt should at least look for  
 later in the sources and not automatically create the first one  
if it is found.

---

<div class="post-metadata">

**Author:** ![slain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/2acd7d/32.png) [@slain](https://www.ruby-forum.com/u/slain)\
**Post date:** [October 13, 2006, 10:14am UTC](https://www.ruby-forum.com/t/engine-javascript-and-engine-stylesheet-broken/71991/2 "2006-10-13T10:14:35Z")

</div>

changing action\_view\_extensions.rb (line 129) to:

if defined?(RAILS\_ROOT) && File.exists?(File.join(RAILS\_ROOT, “public”,  
“#{default}.#{ext}”)) && sources.index(engine\_name) == nil

(added “&& sources.index(engine\_name) == nil” )

fixes this problem (assuming no case issues).
