Ok, so in the middle of learning Ruby, things jumped to 2.0.2 and now i''m having to relearn. I can''t find any answers on this. in new.rhtml.erb I have the following code: <%= error_messages_for :failure %> <% form_for(@failure) do |f| %> <%= render :partial => "form", :locals => { :f => f, :button => "Create" } %> <% end %> -- I created a new file named: _form.rhtml.rb and and have the following: <p> <b>Bus unit</b><br /> <%= f.text_field :bus_unit %> </p> <p> <b>Pro num</b><br /> <%= f.text_field :pro_num %> </p> <p> <b>Ship num</b><br /> <%= f.text_field :ship_num %> </p> <p> <b>Rbna num</b><br /> <%= f.text_field :rbna_num %> </p> -- Basically I moved what was automatically generated by the scaffolding to the new file _form.rhtml.erb. I did this because I plan on changing the "Bus Unit" to a drop down box with 3 options. Everything I''ve found suggest that this is how I need to do it. However, I get the following error: Couldn''t find template file for failures/_form in ["C:/apps/yrcsphere/ app/views"] (If you want, you can find more at http://athel.homeftp.net/failures/new ). What am I doing wrong? Where can I find any documentation on scaffolding/rails and making forms? Thanks ~Athel --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2/10/08, Athel <kristopher.koeller-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Ok, so in the middle of learning Ruby, things jumped to 2.0.2 and now > i''m having to relearn. I can''t find any answers on this. > > in new.rhtml.erb I have the following code: > > <%= error_messages_for :failure %> > > <% form_for(@failure) do |f| %> > <%= render :partial => "form", :locals => { :f => f, :button => > "Create" } %> > <% end %> > > -- > > I created a new file named: _form.rhtml.rb and and have the following:Is that a typo? It should be _form.html.erb -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, its a typo, sorry, I have it named _form.rhtml.erb On Feb 10, 8:19 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 2/10/08, Athel <kristopher.koel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Ok, so in the middle of learning Ruby, things jumped to 2.0.2 and now > > i''m having to relearn. I can''t find any answers on this. > > > in new.rhtml.erb I have the following code: > > > <%= error_messages_for :failure %> > > > <% form_for(@failure) do |f| %> > > <%= render :partial => "form", :locals => { :f => f, :button => > > "Create" } %> > > <% end %> > > > -- > > > I created a new file named: _form.rhtml.rb and and have the following: > > Is that a typo? It should be _form.html.erb > -- > Rick DeNatale > > My blog on Rubyhttp://talklikeaduck.denhaven2.com/- Hide quoted text - > > - Show quoted text ---~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@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 2/10/08, Athel <kristopher.koeller-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Yes, its a typo, sorry, I have it named _form.rhtml.erbOkay, so directory is it in, and what''s the controller? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
its in the directory of: C:\apps\yrcsphere\app\views\failures and the controller is C:\apps\yrcsphere\app\controllers\failures_controller.rb On Feb 10, 8:31 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 2/10/08, Athel <kristopher.koel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Yes, its a typo, sorry, I have it named _form.rhtml.erb > > Okay, so directory is it in, and what''s the controller? > > -- > Rick DeNatale > > My blog on Rubyhttp://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@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 2/10/08, Athel <kristopher.koeller-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > its in the directory of: > > C:\apps\yrcsphere\app\views\failures > > and the controller is > > C:\apps\yrcsphere\app\controllers\failures_controller.rbHmm, that all sounds right to me. I''d suggest checking permissions on the file, but since I see you''re on Windows, I''m not sure that makes sense either. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11 Feb 2008, at 02:22, Athel wrote:> > Yes, its a typo, sorry, I have it named _form.rhtml.erbThat''s still wrong. _form.html.erb is what it should be Fred> > > On Feb 10, 8:19 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On 2/10/08, Athel <kristopher.koel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> >> >> >> >>> Ok, so in the middle of learning Ruby, things jumped to 2.0.2 and >>> now >>> i''m having to relearn. I can''t find any answers on this. >> >>> in new.rhtml.erb I have the following code: >> >>> <%= error_messages_for :failure %> >> >>> <% form_for(@failure) do |f| %> >>> <%= render :partial => "form", :locals => { :f => f, :button => >>> "Create" } %> >>> <% end %> >> >>> -- >> >>> I created a new file named: _form.rhtml.rb and and have the >>> following: >> >> Is that a typo? It should be _form.html.erb >> -- >> Rick DeNatale >> >> My blog on Rubyhttp://talklikeaduck.denhaven2.com/- Hide quoted >> text - >> >> - Show quoted text - > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 2/11/08, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On Feb 10, 8:19 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> On 2/10/08, Athel <kristopher.koel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >>> i''m having to relearn. I can''t find any answers on this. > >> > >>> I created a new file named: _form.rhtml.rb and and have the > >>> following: > >> > >> Is that a typo? It should be _form.html.erb > > On 11 Feb 2008, at 02:22, Athel wrote: > > > > > Yes, its a typo, sorry, I have it named _form.rhtml.erb > > That''s still wrong. _form.html.erb is what it should beGood catch Fred, I''d assumed he was saying that it was named as I''d suggested. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am so sorry. That fixed it. When you said typo, I checked my original post and was missing the e in *erb. Renaming it to _form.html.erb completely fixed it. Thank you all. On Feb 11, 11:54 am, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 2/11/08, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On Feb 10, 8:19 pm, "Rick DeNatale" <rick.denat...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> On 2/10/08, Athel <kristopher.koel...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >>> i''m having to relearn. I can''t find any answers on this. > > > >>> I created a new file named: _form.rhtml.rb and and have the > > >>> following: > > > >> Is that a typo? It should be _form.html.erb > > > On 11 Feb 2008, at 02:22, Athel wrote: > > > > Yes, its a typo, sorry, I have it named _form.rhtml.erb > > > That''s still wrong. _form.html.erb is what it should be > > Good catch Fred, I''d assumed he was saying that it was named as I''d suggested. > > -- > Rick DeNatale > > My blog on Rubyhttp://talklikeaduck.denhaven2.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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---