This project is archived and is in readonly mode.
Template is missing error could be more helpful
Reported by josh | September 3rd, 2009 @ 08:48 PM | in 3.0.2
Output for template missing:
Template is missing
Missing template entries/edit - {:formats=>[:html], :locales=>[:en]} - partial: false.erb in view path /Volumes/37signals/champagne/app/views
Users don't know what that options hash is. And what is "false.erb"?
I'd expect to see something like:
Missing template entries/edit.html.erb in view path /Volumes/37signals/champagne/app/views
Comments and changes to this ticket
-
CancelProfileIsBroken September 25th, 2009 @ 12:35 PM
- Tag set to bugmash
- Milestone cleared.
- Assigned user cleared.
-
Felipe Talavera September 26th, 2009 @ 11:09 AM
I've been studying the problem.
It's only present in master, the thing is the find method ActionView::PathSet raise the ActionView::MissingTemplate with the "entries/edit - {:formats=>[:html], :locales=>[:en]} - partial: false.erb" string while the ActionView::MissingTemplate initializer expect only a path for the missing file, because of that the user see the ugly message of above.
The thing is that the details[:formats] is an array and I'm not sure if it does but can have more than one format and in this case we'll have to change the mensaje format in the initializer, provisionally I changed the rasing in the find to this:
format = details[:formats].first.to_s raise ActionView::MissingTemplate.new(self, "#{prefix}/#{path}.#{format}")
But, I'm not sure if it's a rock solid solution.
-
Felipe Talavera September 26th, 2009 @ 11:51 AM
new patch doing the same but without the format instance variable.
-
Dan Pickett September 26th, 2009 @ 05:31 PM
I'm not sure this approach will work - I think for the message to be effective, we want to know what content type / format the user is requesting.
-
josh October 4th, 2009 @ 05:28 PM
- Milestone cleared.
- Assigned user set to Yehuda Katz (wycats)
(restored assignment, please don't change this)
-
Yehuda Katz (wycats) February 24th, 2010 @ 07:32 AM
- State changed from new to resolved
This output has been improved some.
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to
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>