yangkunlun
yangkunlun

Reputation: 21

How to create a Ruby on Rails 3 gem with a generator to copy file to /assets?

When I create a gem generator, it seems does not work at all. Is there any tutorial you would recommend?

Upvotes: 2

Views: 509

Answers (1)

ghr
ghr

Reputation: 647

My colleague did something similar.

Take a look through that gem and it should be easy enough to replicate.

Instead of directory you might need template:

template('app/assets/stylesheets/gemstyles.css', 'app/assets/stylesheets/gemstyles.css')

Upvotes: 1

Related Questions