Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

.orig files override standard erb files with rails 2.3

#3145

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.

Reported by stuzart · September 4th, 2009 @ 12:01 PM

State: invalid
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. stuzart
    stuzart

    Infact the .orig extension is irrelevant. Just tried renaming to main.html.erb.fred and the same problem occurs.

    September 4th, 2009 @ 12:02 PM

  2. CancelProfileIsBroken
  3. Blue Box Jesse
    Blue Box Jesse

    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.orig

    Created two views:

    welcome.html.erb
    welcome.html.erb.orig

    Told 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.

    September 26th, 2009 @ 08:33 PM

  4. John Pignata
  5. rbxbx
    rbxbx

    -1 cannot reproduce following similar steps to blue box jesse.

    September 26th, 2009 @ 10:21 PM

  6. Robert Rouse
    Robert Rouse

    -1 cannot reproduce as well

    September 26th, 2009 @ 10:24 PM

  7. sr.iniv.t
    sr.iniv.t

    -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.

    September 27th, 2009 @ 12:31 AM

  8. CancelProfileIsBroken
    CancelProfileIsBroken
    • State changed from new to invalid
    • Tag cleared.

    September 27th, 2009 @ 11:58 AM