Yi Tan
2006-Jun-05 17:24 UTC
[Rails] what''s the best way to organise lots functions in application.rb
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060605/50036581/attachment.html
Brian Hogan
2006-Jun-05 18:32 UTC
[Rails] what''s the best way to organise lots functions in application.rb
You might consider looking at modules. See the book "Pragmatic Ruby" for examples of this. On 6/5/06, Yi Tan <yi.tan.uk@gmail.com> wrote:> 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >