Forms and relationships

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.

On 04/08/06, Josh K. [email protected] 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].

Hasan D. wrote:

There’s a “Best practises” page you might want to take a look at [1].

on the rails wiki?

On 05/08/06, Josh K. [email protected] wrote:

on the rails wiki?

I did put the link to it, below my signature.