i''m still pretty new to rails, and while i''ve been able to hack my way into having it do what i want so far, i''m not happy with the way my code looks. on top of that, i''m sure that what i''m doing prlly isn''t the most efficient either. one of my biggest problems is probably to do with using relationships and forms together. i''ve done some basic things like pull records from one model and display it in a pull down when creating another one when it has a has_many and belongs_to relationship, but that''s about it. can anyone offer any resources or help when dealing with forms and habtm or has_many through stuff? like i said before, i''ve made it work, but i''m looking for best practices and methods for doing stuff like that. -- Posted via http://www.ruby-forum.com/.
On 04/08/06, Josh Kieschnick <jjkiesch@gmail.com> wrote:> > i''m still pretty new to rails, and while i''ve been able to hack my way > into having it do what i want so far, i''m not happy with the way my code > looks. on top of that, i''m sure that what i''m doing prlly isn''t the most > efficient either. >There''s a "Best practises" page you might want to take a look at [1]. Don''t worry so much about efficiency -- get the code completely working first, then use a profiler to find out what optimisations will help [2]. -- Cheers, Hasan Diwan <hasan.diwan@gmail.com> 1. http://glu.ttono.us/articles/2006/02/06/rails-best-practices-tips-and-tricks 2. http://www.rubygarden.org/ruby?Ruby_Profiler -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060805/e97c47bf/attachment.html
Hasan Diwan wrote:> > There''s a "Best practises" page you might want to take a look at [1].on the rails wiki? -- Posted via http://www.ruby-forum.com/.
On 05/08/06, Josh Kieschnick <jjkiesch@gmail.com> wrote:> > on the rails wiki?I did put the link to it, below my signature. -- Cheers, Hasan Diwan <hasan.diwan@gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060806/5d84bfc9/attachment.html