Forum: Ruby on Rails Rails Best Practices Page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-17 15:45
(Received via mailing list)
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
8ed6d55dddf47e0974bac833f08e4390?d=identicon&s=25 Ian Harding (Guest)
on 2006-01-17 17:01
(Received via mailing list)
Yes.  I like this idea.

On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:
> or maybe even using collection_of_partials.  maybe taking the 10-20
> _______________________________________________
> 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
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-17 17:19
(Received via mailing list)
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
455ac2a64d06dc8461f4d258d7f7e980?d=identicon&s=25 Michael Trier (Guest)
on 2006-01-17 18:22
(Received via mailing list)
On 1/17/06, Adam Denenberg <straightflush@gmail.com> wrote:
>
> > > Does anybody think it would be beneficial to have kind of like a rails
> > > "Man i should have done it that way, i could have saved 10 lines of
> >
> >
>

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
4f86dba83a7b1b127263bb3fdd0b09e7?d=identicon&s=25 Ammon Christiansen (ammonc)
on 2006-01-17 20:34
(Received via mailing list)
I think that is a great idea!
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-17 21:47
(Received via mailing list)
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
8ed6d55dddf47e0974bac833f08e4390?d=identicon&s=25 Ian Harding (Guest)
on 2006-01-18 23:29
(Received via mailing list)
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
This topic is locked and can not be replied to.