What's the best way to organise lots functions in applicatio


#1

Hi all,

Please forgive me for this newbie question.

I’m developing an application on RoR, and found I got more and more
shared
functions in application.rb. It looks very disorganised. And so I’m
seeking
your expertise for a better way to organise shared functions.

After reading some open source code, I found some experienced developers
are
using modules, and put codes in /lib folder. But I don’t understander
this
very well. Do you know is there any articles on the net discussing this
issue.

Many thanks.


Regards,

Yi


#2

You might consider looking at modules. See the book “Pragmatic Ruby”
for examples of this.