This project is archived and is in readonly mode.
.orig files override standard erb files with rails 2.3
Reported by stuzart | September 4th, 2009 @ 12:01 PM
I came across this when I first upgraded to rails 2.3.2, and have encountered it again.
Because I use mercurial as my version control system, whenever I roll back or encounter a merge a .orig file is generated. When running in either development or production it seems that Rails uses this erb file rather than the correct one.
i.e:
app/views/layouts/main.html.erb
app/views/layouts/main.html.erb.orig <--- this one is used
appears to affect both normal files and those rendered as partials.
Comments and changes to this ticket
-
stuzart September 4th, 2009 @ 12:02 PM
Infact the .orig extension is irrelevant. Just tried renaming to main.html.erb.fred and the same problem occurs.
-
CancelProfileIsBroken September 25th, 2009 @ 12:34 PM
- Tag set to bugmash
-
Blue Box Jesse September 26th, 2009 @ 08:33 PM
BugMash: not reproducible
Created a new rails application. Created a "test" controller with one render action. Created two layouts:
main.html.erb
main.html.erb.origCreated two views:
welcome.html.erb
welcome.html.erb.origTold rails to use the "main" layout for the test controller.
Rails renders the main.html.erb and welcome.html.erb files correctly.
Renamed the .orig files to be .fred and rails still grabs the proper files.
Removed my two .html.erb files leave just the .fred files, and Rails complains about not being able to find the views. Changed .fred to .orig and still no dice.
I don't believe this is a bug.
-
rbxbx September 26th, 2009 @ 10:21 PM
-1 cannot reproduce following similar steps to blue box jesse.
-
sr.iniv.t September 27th, 2009 @ 12:31 AM
-1 not reproducible.
Had an action 'home' and a corresponding view 'home.html.erb'. Copied 'home.html.erb' to 'home.html.erb.orig' and modified the file. Invoking the 'home' action correctly renders 'home.html.erb'. Renamed home.html.erb to home.html.krb, now rendering fails. Renamed home.html.erb.orig to home.html.erb, not the contents of this file (former home.html.erb.orig) get rendered.
-
CancelProfileIsBroken September 27th, 2009 @ 11:58 AM
- State changed from new to invalid
- Tag cleared.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>