This project is archived and is in readonly mode.
Wrong view rendered
-
ronin-24128 (at lighthouseapp)
Confirmed with rails 2.2.2 and 2.3.0 on Ubuntu 8.10. I had form.html.haml and form.html.haml~ (old backup) in one of my views folders and I was wondering why my updates are not rendered even after restarting server. After deleting backup copy everything works fine.
-
DHH
- Assigned user set to josh
- Milestone cleared.
-
josh
- State changed from new to open
The problem is that unknown extension types fallback to erb rendering. I know a patch was submitted for this, but maybe they only really wanted ones with no extension to fallback to erb.
-
Repository
- State changed from open to resolved
(from [e4a7c0bb5b175e6eceb2fe808075d6122521237c]) ~ backup files don't clobber original templates [#1818 Wrong view rendered state:resolved] http://github.com/rails/rails/co...
-
Chris Barnett
Looks like that commit may not have fixed the problem.
See the attached patch, it just adds a "shared.html.erb~" file to actionpack's test fixtures, which causes existing tests to fail.
Apologies for not doing something more positive, like writing a patch that works. I did try, but couldn't get my head around the template-finding code.
-
josh
- State changed from resolved to open
-
josh
- State changed from open to wontfix
Sorry, but I don't think this is going to be fix fixable for 2.3.
In 3.0 we can revisit this try to come up with a solid template choosing solution.
-
Andrew White
I've just added ticket #1909 Improve view performance in development and reinstate template reloading in p... which should fix this problem along with some extra benefits. I'd be grateful if you could check it out and see if it fixes things for you.
-
Hans de Graaff
I've just run into this problem with the released version 2.3.2.
With these files present:
app/views/controller/view.html.erb app/views/controller/view.html.erb.~1~
the latter (emacs backup file) is being picked up instead of being ignored like in rails 2.1.x and earlier versions. I have not tested with rails 2.2.x.
Reading through #1909 Improve view performance in development and reinstate template reloading in p... it seems that the fix Andrew mentions in his comment should already be applied to 2.3.2, but this problem still persists.
-
thedarkone
Hi Hans,
what about master (past v2.3.2.1 tag)?
