# Generators

**URL:** <https://www.ruby-forum.com/t/generators/181050>\
**Category:** Rails\
**Created:** [January 4, 2010, 4:29pm UTC](https://www.ruby-forum.com/t/generators/181050 "2010-01-04T16:29:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [January 4, 2010, 4:29pm UTC](https://www.ruby-forum.com/t/generators/181050/1 "2010-01-04T16:29:41Z")

</div>

Could anyone tell me (or link me to) the best place to learn about RoR  
Module Generators?

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [January 4, 2010, 9:07pm UTC](https://www.ruby-forum.com/t/generators/181050/2 "2010-01-04T21:07:49Z")

</div>

Pale H. wrote:

> Could anyone tell me (or link me to) the best place to learn about RoR  
> Module Generators?

What do you want to know?

And what are you going to use them for? Unless they generate  
_extremely_ skeletal code, generators are a bad thing. (See  
restful\_authentication for an example of how _not_ to use generators.)

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [January 5, 2010, 10:05am UTC](https://www.ruby-forum.com/t/generators/181050/3 "2010-01-05T10:05:14Z")

</div>

Marnen Laibow-Koser wrote:

> Pale H. wrote:
> 
> > Could anyone tell me (or link me to) the best place to learn about RoR  
> > Module Generators?
> 
> What do you want to know?
> 
> And what are you going to use them for? Unless they generate  
> _extremely_ skeletal code, generators are a bad thing. (See  
> restful\_authentication for an example of how _not_ to use generators.)
> 
> Best,  
> –Â  
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid

One example that I often use is a News feature… I just want to know  
how I can build a generator and then, utilise it.

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [January 5, 2010, 7:38pm UTC](https://www.ruby-forum.com/t/generators/181050/4 "2010-01-05T19:38:57Z")

</div>

Rails comes with a number of generators (see the output of `script/ generate` for more information). None of them, however, are “Module  
Generators”, so your question is impossible to answer as asked. A  
module is a Ruby thing, not a Rails thing. Perhaps you can be more  
specific as to what you want to generate or what goal you are trying  
to accomplish?

---

<div class="post-metadata">

**Author:** ![mercurius](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c89c15/32.png) [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Post date:** [January 5, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/generators/181050/5 "2010-01-05T12:24:09Z")

</div>

Pale H. wrote:  
[…]

> One example that I often use is a News feature…

Bad example. A plugin would probably better here.

> I just want to know  
> how I can build a generator and then, utilise it.

Again: don’t unless you’re sure that a plugin won’t be the better  
choice.

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
