How to override a rails generator template in a gem?

后端 未结 6 1089
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-01 07:18

When you want to override a generator template (without replacing the generator itself), in Rails 3 you can just drop files in appropriately named places in lib/templates and Ra

6条回答
  •  鱼传尺愫
    2021-02-01 07:26

    Only the path '../../templates' in g.templates.unshift File::expand_path('../../templates', _ FILE _) worked for me. Im in rails 3.2

提交回复
热议问题