wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
2009-May-28 15:51 UTC
confused on how rails 2.3.2 renders templates
I am migrating to rails 2.3.2 What I found confusing is that in some cases when I have a template named: "something.html.erb" it is looking for "something.erb", but in other cases "something.html.erb" works fine. I looked at a couple of cases and did not see any obvious reason why that seemed to be the case where it was looking for one type of file name in one place and a different in another.
On Thu, May 28, 2009 at 8:51 AM, wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org <wbsurfver-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> > > I am migrating to rails 2.3.2 > > What I found confusing is that in some cases when I have a template > named: > > "something.html.erb" it is looking for "something.erb", but in other > cases "something.html.erb" works fine. > I looked at a couple of cases and did not see any obvious reason why > that seemed to be the case where it was looking for one type of file > name in one place and a different in another. > >Please post the relevant code that''s requesting something.erb so that we can better assist. -Conrad --~--~---------~--~----~------------~-------~--~----~ 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 think I figured out what was going on. When I had a file named "something.html.erb.save" in the view directory, rails 2.3.2 for some strange reason decided to render that template instead of "something.html.erb". When I deleted "something.html.erb.save" then rails 2.3.2 looked for "something.erb" which did not exist, though something.html.erb" did exist. When I restarted web brick however after deleting "something.html.erb.save", then it did find "something.html.erb" ok. So Rails was keeping state info when the server was running On May 28, 11:53 am, Conrad Taylor <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Thu, May 28, 2009 at 8:51 AM, wbsurf...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org <wbsurf...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > > > > > I am migrating to rails 2.3.2 > > > What I found confusing is that in some cases when I have a template > > named: > > > "something.html.erb" it is looking for "something.erb", but in other > > cases "something.html.erb" works fine. > > I looked at a couple of cases and did not see any obvious reason why > > that seemed to be the case where it was looking for one type of file > > name in one place and a different in another. > > Please post the relevant code that''s requesting something.erb so that > we can better assist. > > -Conrad