Backup copy of the application layout

I have noticed that if I have an application layout (app/views/layouts/ application.html.erb) and I copy it to a backup file (e.g., app/views/ layouts/application.html.erb.bak) and then make changes to the original, for some reason Rails seems to want to refer to the .bak file rather than the original file. So, changes that I make to the original file are effectively ignored. I've now been caught by this anomaly twice now. I think it's time that I understood it. An explanation would be appreciated. Thanks.

            ... doug

This was a bug in some versions of Rails (2.3.? I think). I believe it is fixed in current Rails.

The workaround is not to have any extra files, such as backups, in view folders.

Colin

The bug you're tripping over here looks like this one:

https://rails.lighthouseapp.com/projects/8994/tickets/1818-wrong-view-rendered

The solution in the short term is to not leave backup files laying around. That's what source control is for...

--Matt Joens

This was a bug in some versions of Rails (2.3.? I think). I believe it is fixed in current Rails.

I am running 2.3.2. Apparently that is an affected version. Anyway, glad to understand the issue.

Thanks to all for the input.

           ... doug