Generators

0 views
Skip to first unread message

Pale Horse

unread,
Jan 4, 2010, 10:29:41 AM1/4/10
to rubyonra...@googlegroups.com
Could anyone tell me (or link me to) the best place to learn about RoR
Module Generators?
--
Posted via http://www.ruby-forum.com/.

Marnen Laibow-Koser

unread,
Jan 4, 2010, 3:07:49 PM1/4/10
to rubyonra...@googlegroups.com
Pale Horse 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
mar...@marnen.org

Pale Horse

unread,
Jan 5, 2010, 4:05:14 AM1/5/10
to rubyonra...@googlegroups.com

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.

Marnen Laibow-Koser

unread,
Jan 5, 2010, 6:24:09 AM1/5/10
to rubyonra...@googlegroups.com
Pale Horse 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
mar...@marnen.org

Rein Henrichs

unread,
Jan 5, 2010, 1:37:30 PM1/5/10
to Ruby on Rails: Talk
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?
Reply all
Reply to author
Forward
0 new messages