How do I use railties to install files other than migrations (for e.g. config files)
I'm using Rails 3.1 and I am able to use rail开发者_运维技巧ties to install migrations (by doing rake railties:install:migrations FROM=plugin_name). However, I have a couple of config files (.yml, etc.) that I need to copy over as well. How do I do this ?
For example see the code in a gem i created: https://github.com/nathanvda/on_the_spot/blob/master/lib/generators/on_the_spot/install/install_generator.rb
Simply put: use thor commands, like copy_file
.
Hope this helps.
精彩评论