I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1, part2 and part3. It seems to be my case. I have: Company has_many :documents has_many :tenders, :through.......... and Document belongs_to :company Tender has_many :companies, :through.......... I want to insert documents and tenerds on company creation. If documents are more than one the user can click "add another" and other fields are added to form. It seems ok but I fear that it makes too complex my code. I think it is better to insert a Company and after saved it then add one or more documents or tenders in different forms. What do you think about? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 November 2011 13:52, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1, > part2 and part3. > It seems to be my case. > I have: > Company > has_many :documents > has_many :tenders, :through.......... > > and > Document > belongs_to :company > > Tender > has_many :companies, :through.......... > > I want to insert documents and tenerds on company creation. > If documents are more than one the user can click "add another" and > other fields are added to form. > It seems ok but I fear that it makes too complex my code. > I think it is better to insert a Company and after saved it then add > one or more documents or tenders in different forms. > What do you think about?What matters is what is best for the user of the site. On the other hand there is a lot to be said (especially when still learning) for doing the simplest that will work initially and then refining it later. Colin> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- gplus.to/clanlaw -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 November 2011 15:29, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 12 November 2011 13:52, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1, >> part2 and part3. >> It seems to be my case. >> I have: >> Company >> has_many :documents >> has_many :tenders, :through.......... >> >> and >> Document >> belongs_to :company >> >> Tender >> has_many :companies, :through.......... >> >> I want to insert documents and tenerds on company creation. >> If documents are more than one the user can click "add another" and >> other fields are added to form. >> It seems ok but I fear that it makes too complex my code. >> I think it is better to insert a Company and after saved it then add >> one or more documents or tenders in different forms. >> What do you think about? > > What matters is what is best for the user of the site. On the other > hand there is a lot to be said (especially when still learning) for > doing the simplest that will work initially and then refining it > later.In a similar situation what could it be your approach? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 12 November 2011 14:41, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12 November 2011 15:29, Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 12 November 2011 13:52, Mauro <mrsanna1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> I''ve seen http://railscasts.com/episodes/73-complex-forms-part-1, >>> part2 and part3. >>> It seems to be my case. >>> I have: >>> Company >>> has_many :documents >>> has_many :tenders, :through.......... >>> >>> and >>> Document >>> belongs_to :company >>> >>> Tender >>> has_many :companies, :through.......... >>> >>> I want to insert documents and tenerds on company creation. >>> If documents are more than one the user can click "add another" and >>> other fields are added to form. >>> It seems ok but I fear that it makes too complex my code. >>> I think it is better to insert a Company and after saved it then add >>> one or more documents or tenders in different forms. >>> What do you think about? >> >> What matters is what is best for the user of the site. On the other >> hand there is a lot to be said (especially when still learning) for >> doing the simplest that will work initially and then refining it >> later. > > In a similar situation what could it be your approach?I cannot advise you how your website should operate, that is up to you. You could try it one way, see how it feels, try it the other and then decide which you like best. Make sure you use a version control system (git for example) so you can easily get back to where you were previously and so you have a record of what you did. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.