You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed two errors in the reporting of errors with jbuilder partials rendered from a view.
The first is weird but not a big deal, the second is really problematic for debugging.
NoMethodError in Application#home
Showing ~/MyTest/app/views/users/_user.html.haml where line # raised:
undefined method `undefined_method_called_from_jbuilder_template' for #User:0x007fb2bea96de8
The reported file is wrong: it should be the JSON version.
So now, the second error is visible when there is no other version of the same partial (in my case, by removing _user.html.haml).
ActionView::MissingTemplate in Application#data
Showing ~/MyTest/app/views/application/home.html.haml where line #1 raised:
Missing partial users/user with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :jbuilder, :coffee, :haml]}.
What the hell? Why does any errors occurring in the partial are ignored and reported as a missing template (plus, the formats and handlers are not correct?
If I fix the error (not easy with this weird report) in the template, it works!
Any idea?
The text was updated successfully, but these errors were encountered:
Hi,
I noticed two errors in the reporting of errors with jbuilder partials rendered from a view.
The first is weird but not a big deal, the second is really problematic for debugging.
I have a view and two partials.
In
views/application/home.html.haml
, I have:In
views/users/_user.html.haml
, I have:In
views/users/_user.json.jbuilder
, I have:Displaying the page raises:
The reported file is wrong: it should be the JSON version.
So now, the second error is visible when there is no other version of the same partial (in my case, by removing
_user.html.haml
).What the hell? Why does any errors occurring in the partial are ignored and reported as a missing template (plus, the
formats
andhandlers
are not correct?If I fix the error (not easy with this weird report) in the template, it works!
Any idea?
The text was updated successfully, but these errors were encountered: