Forum: Rails Engines why are files in publyic done differently?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Bfccdb1c41c334fec20e5ede3a7ccfcc?d=identicon&s=25 Andrew Roth (andrewroth)
on 2007-05-27 06:27
Hi all,

With engines, the general use case is to create your own local methods
to override any classes the engine creates.  Why then are assets (ie
stylesheets/javascripts etc) treated differently?  They're copied to the
plugin_assets folder.  You then have to refer to them manually with
:plugin => '...' option.

I would have expected them to "just work" like the
controllers/views/models without any copying, and if you want, you can
put files with the same name in your local app's public dir to override.
Just curious, why was it done the way it is?  Is there an easy way to
make it so that plugin assets are copied directly to public?

-Andrew Roth
This topic is locked and can not be replied to.