I have moved my ''new'' rhtml from the customer view to the admin/add_customerview. The ''_form.rhtml'' is still in thecustomer/viewfolder. In keeping with the DRY mantra, I want to reference the customer/_form.rhtml file from the admin/add_customer.rhtml file like so: ... <%= start_form_tag :action => ''create'' %> <%= render_partial ''../customer/form'' %> <%= submit_tag "Create" %> <%= end_form_tag %> ... I''ve also tried: <%= render_partial ''customer/form'' %> and <%= render_partial ''/customer/form'' %> But, that didn''t work. Can it be done? If so, how? -- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FWIW: render_partial is deprecated, use render :partial instead. I used this code: <%= render :partial => ''common/header'' %> to render a common header for my views. common is a subfolder of the views folder. In common I have the file _header.rhtml. That works for me. Think I suggested adding a "/" in a mail to you (right), but it''s supposed to be without Hope that helps. Ronny Larry Kelly wrote:> > I have moved my ''new'' rhtml from the customer view to the > admin/add_customer view. The ''_form.rhtml'' is still in the > customer/view folder. In keeping with the DRY mantra, I want to > reference the customer/_form.rhtml file from the > admin/add_customer.rhtml file like so: > ... > <%= start_form_tag :action => ''create'' %> > <%= render_partial ''../customer/form'' %> > <%= submit_tag "Create" %> > <%= end_form_tag %> > ... > > I''ve also tried: > <%= render_partial ''customer/form'' %> > and > <%= render_partial ''/customer/form'' %> > > But, that didn''t work. Can it be done? If so, how? > > -- > Best Regards, > -Larry > "Work, work, work...there is no satisfactory alternative." > --- E.Taft Benson > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails- -- - ------------------------------------------------------------------------ /*Ronny Hanssen*/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDBRRUMRRzQX3ma+kRAvE8AKCQlkxmjVVvhft/Mk9mxo0fWwAYdQCfZrkS br4ymnnpqhS5QjxicAOuxj4=zVDi -----END PGP SIGNATURE-----
Thanks for the tip and the FWIW. I finally realized that Rails pluralization was the issue. The view folder was named ''customers'' not ''customer''. duh! -L On 8/18/05, Ronny Hanssen <ronnyh-7tg5dEkr+6sdnm+yROfE0A@public.gmane.org> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > FWIW: render_partial is deprecated, use render :partial instead. > > I used this code: > <%= render :partial => ''common/header'' %> > to render a common header for my views. common is a subfolder of the > views folder. In common I have the file _header.rhtml. > > That works for me. Think I suggested adding a "/" in a mail to you > (right), but it''s supposed to be without > > Hope that helps. > Ronny > > Larry Kelly wrote: > > > > I have moved my ''new'' rhtml from the customer view to the > > admin/add_customer view. The ''_form.rhtml'' is still in the > > customer/view folder. In keeping with the DRY mantra, I want to > > reference the customer/_form.rhtml file from the > > admin/add_customer.rhtml file like so: > > ... > > <%= start_form_tag :action => ''create'' %> > > <%= render_partial ''../customer/form'' %> > > <%= submit_tag "Create" %> > > <%= end_form_tag %> > > ... > > > > I''ve also tried: > > <%= render_partial ''customer/form'' %> > > and > > <%= render_partial ''/customer/form'' %> > > > > But, that didn''t work. Can it be done? If so, how? > > > > -- > > Best Regards, > > -Larry > > "Work, work, work...there is no satisfactory alternative." > > --- E.Taft Benson > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > - -- > - ------------------------------------------------------------------------ > /*Ronny Hanssen*/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.0 (MingW32) > Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org > > iD8DBQFDBRRUMRRzQX3ma+kRAvE8AKCQlkxmjVVvhft/Mk9mxo0fWwAYdQCfZrkS > br4ymnnpqhS5QjxicAOuxj4> =zVDi > -----END PGP SIGNATURE----- > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Best Regards, -Larry "Work, work, work...there is no satisfactory alternative." --- E.Taft Benson _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails