HAii.. sorry my English is very bad I don't what you want... but I have idea why do u not use 3 model / 3 table?
table job id table join_job_step job_id step_id table step id this is "has_many_and_belongs_to" (same), but Don't use "has_many_and_belongs_to". Model: * job has_many :join_job_steps * join_job_step belongs_to :job * step has_may :join_job_steps So, when u create job or step, u don't need step_id or job_id.. And if u want make relation, just create join_job_step. May be it can help u... Thank you -- Wu You Duan(Anton effendi) Senior Rails Developer www.kiranatama.com On Mon, Dec 22, 2008 at 4:29 PM, John Smith < rails-mailing-l...@andreas-s.net> wrote: > > Thanks, I know. > If I can create a job first I have no problem, but I can't do that. I > want to be able to create a job and, at the same time, create as many > steps as I want. I would use AJAX in order to create new step fields, > but if I have not created a job I can have any relation between a step > and a job. > Any ideas? > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---