Rails 3 generators in gem

前端 未结 2 1890
说谎
说谎 2020-12-14 20:00

Might sound like a simple question, but I\'m stumped.

I\'ve created a gem that essentially contains a generator.

It contains the following structure:

2条回答
  •  旧时难觅i
    2020-12-14 20:18

    If you use Railtie, you can define your generator wherever it could be using:

    generators do
        require "path/to/my_railtie_generator"
    end
    

    in Railtie class.

提交回复
热议问题