rake foo:install:assets instead of create_symlinks for engines #79

wants to merge 6 commits into


None yet

1 participant

Ruby on Rails member

Copying static assets to application's public directory is saner way of handling engines' assets. This commits remove railties:create_symlinks rake task in favor of foo:install:assets (where foo is engine's name).

The implementation is really straightforward and simple, all the files from engine's public directory are copied to application. It is done with Generators::Base#copy_file, so if files differ user will be asked if the file should be replaced.

I don't see a need for anything more sophisticated, as in 3.1 preferred way of handling assets will be to keep them in app/assets and API behind that will be probably used to properly handle engines' assets.

drogus added some commits Oct 10, 2010
@drogus drogus Do not treat information about skipped migrations as WARNINGs but as …
…a NOTEs, also puts to stdin
@drogus drogus Added foo:install:assets task that copies assets from plugins public …
…directory to application's public directory

This is the most simple and naive approach: just copy every files from engine to app.
The only exception is when file has changed, in that case developer will be
asked if he wants to rename the field.

There is no need to make this task more sophisticated as 3.1 will be shipped
with better assets handling and it will be the default way to handle things.
@drogus drogus Add task foo:install (where foo is plugin) as a shortcutinstall:migra…
…tions and foo:install:assets
@drogus drogus Update documentation for new tasks ae96632
@drogus drogus Remove task for creating symlinks for railties 61c7b8e
@drogus drogus Use railtie_name to correctly get name from plugins dd751f9
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment