Hey, I have been progressively learning more and more rails each day (from both a current project, reading the agile book, and this list). Does anybody think it would be beneficial to have kind of like a rails "Best Practices" page that lists some of the better ways of handling certain functions of rails (that are common in most apps) that are both more elegant, and efficient. For example a lot of people are unware of the :include part of a find, or maybe even using collection_of_partials. maybe taking the 10-20 most common tasks in rails, and showing the way the most seasoned rails developers are handling the same problems? I find myself 2 weeks after coding part of a project always saying, "Man i should have done it that way, i could have saved 10 lines of code and its so much more readable". any thoughts ? adam
Yes. I like this idea. On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:> Hey, > > I have been progressively learning more and more rails each day > (from both a current project, reading the agile book, and this list). > Does anybody think it would be beneficial to have kind of like a rails > "Best Practices" page that lists some of the better ways of handling > certain functions of rails (that are common in most apps) that are > both more elegant, and efficient. > > For example a lot of people are unware of the :include part of a find, > or maybe even using collection_of_partials. maybe taking the 10-20 > most common tasks in rails, and showing the way the most seasoned > rails developers are handling the same problems? > > I find myself 2 weeks after coding part of a project always saying, > "Man i should have done it that way, i could have saved 10 lines of > code and its so much more readable". > > any thoughts ? > > adam > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- "Her faults were those of her race and sex; her virtues were her own. Farewell, and if for ever - " -- "Travels with a Donkey in the Cevennes" by Robert Louis Stevenson
Ok I have added a page to the Wiki and linked it from the main. Any seasoned rails developers who would like to contribute what they think is a "Best Practice", please feel free to contribute to the Wiki. I think it will definitely save a lot of developers a lot of time for rails tasks that we do most often. http://wiki.rubyonrails.org/rails/pages/RailsBestPractices thanks everyone. adam On 1/17/06, Ian Harding <harding.ian@gmail.com> wrote:> Yes. I like this idea. > > On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote: > > Hey, > > > > I have been progressively learning more and more rails each day > > (from both a current project, reading the agile book, and this list). > > Does anybody think it would be beneficial to have kind of like a rails > > "Best Practices" page that lists some of the better ways of handling > > certain functions of rails (that are common in most apps) that are > > both more elegant, and efficient. > > > > For example a lot of people are unware of the :include part of a find, > > or maybe even using collection_of_partials. maybe taking the 10-20 > > most common tasks in rails, and showing the way the most seasoned > > rails developers are handling the same problems? > > > > I find myself 2 weeks after coding part of a project always saying, > > "Man i should have done it that way, i could have saved 10 lines of > > code and its so much more readable". > > > > any thoughts ? > > > > adam > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > "Her faults were those of her race and sex; her virtues were her own. > Farewell, and if for ever - " > > -- "Travels with a Donkey in the Cevennes" by Robert Louis Stevenson > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:> > Ok I have added a page to the Wiki and linked it from the main. Any > seasoned rails developers who would like to contribute what they think > is a "Best Practice", please feel free to contribute to the Wiki. I > think it will definitely save a lot of developers a lot of time for > rails tasks that we do most often. > > http://wiki.rubyonrails.org/rails/pages/RailsBestPractices > > thanks everyone. > > adam > > On 1/17/06, Ian Harding <harding.ian@gmail.com> wrote: > > Yes. I like this idea. > > > > On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote: > > > Hey, > > > > > > I have been progressively learning more and more rails each day > > > (from both a current project, reading the agile book, and this list). > > > Does anybody think it would be beneficial to have kind of like a rails > > > "Best Practices" page that lists some of the better ways of handling > > > certain functions of rails (that are common in most apps) that are > > > both more elegant, and efficient. > > > > > > For example a lot of people are unware of the :include part of a find, > > > or maybe even using collection_of_partials. maybe taking the 10-20 > > > most common tasks in rails, and showing the way the most seasoned > > > rails developers are handling the same problems? > > > > > > I find myself 2 weeks after coding part of a project always saying, > > > "Man i should have done it that way, i could have saved 10 lines of > > > code and its so much more readable". > > > > > > any thoughts ? > > > > > > adam > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > > "Her faults were those of her race and sex; her virtues were her own. > > Farewell, and if for ever - " > > > > -- "Travels with a Donkey in the Cevennes" by Robert Louis Stevenson > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >Great idea. I find myself doing the same thing. After three hours of hacking something together, I find out I could have done it in one line. :) Michael Trier -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/4e06728b/attachment-0001.html
I think that is a great idea! On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:> > Hey, > > I have been progressively learning more and more rails each day > (from both a current project, reading the agile book, and this list). > Does anybody think it would be beneficial to have kind of like a rails > "Best Practices" page that lists some of the better ways of handling > certain functions of rails (that are common in most apps) that are > both more elegant, and efficient. > > For example a lot of people are unware of the :include part of a find, > or maybe even using collection_of_partials. maybe taking the 10-20 > most common tasks in rails, and showing the way the most seasoned > rails developers are handling the same problems? > > I find myself 2 weeks after coding part of a project always saying, > "Man i should have done it that way, i could have saved 10 lines of > code and its so much more readable". > > any thoughts ? > > adam > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060117/f036b068/attachment.html
Ok Seasoned Developers. Please post what you find to be Best Practices of your "everyday" coding in rails for the rest of the world to share on the wiki page. thanks adam On 1/17/06, Ammon Christiansen <ammon.christiansen@gmail.com> wrote:> I think that is a great idea! > > On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote: > > > > Hey, > > > > I have been progressively learning more and more rails each day > > (from both a current project, reading the agile book, and this list). > > Does anybody think it would be beneficial to have kind of like a rails > > "Best Practices" page that lists some of the better ways of handling > > certain functions of rails (that are common in most apps) that are > > both more elegant, and efficient. > > > > For example a lot of people are unware of the :include part of a find, > > or maybe even using collection_of_partials. maybe taking the 10-20 > > most common tasks in rails, and showing the way the most seasoned > > rails developers are handling the same problems? > > > > I find myself 2 weeks after coding part of a project always saying, > > "Man i should have done it that way, i could have saved 10 lines of > > code and its so much more readable". > > > > any thoughts ? > > > > adam > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:> Ok Seasoned Developers. > > Please post what you find to be Best Practices of your "everyday" > coding in rails for the rest of the world to share on the wiki page. > > thanks > adam >I find myself having to generate a form with a line for each record in a collection, plus some blanks for additional input. I''d like to know how best to handle the identification and iteration of those params when they come back. This seems like something a lot of people have probably reinvented over the years... Thanks! - Ian