开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜