开发者

How do I use railties to install files other than migrations (for e.g. config files)

开发者 https://www.devze.com 2023-04-08 19:29 出处:网络
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, et

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消