firstdraft / draft_generators

Rails generators that help beginners learn to program.
MIT License
2 stars 3 forks source link

Add `--ideas-sentinels` flag to `draft:resource` and `draft:scaffold` #11

Closed raghubetina closed 6 years ago

raghubetina commented 6 years ago

Add a flag --ideas-sentinels to draft:resource or draft:scaffold generators such that comments are embedded in the templates like this:

<!-- indirect associations -->

to give Ideas an easy way to insert generated code, regardless of which generator is used / if the generators are updated.

Thoughts on this @murugan-r?

murugan-r commented 6 years ago

Nice idea. It would be more robust than the current implementation.

murugan-r commented 6 years ago

@raghubetina It looks like find and replace code are very specific to particular column. https://github.com/murugan-r/photogram_template/commits/master/app/views/photos/index.html.erb

Generalising the comments for block of code doesn't work for the purpose.