I can write:
<%= debug(params) %>
<%= debug(session) %>
but not:
<%= debug(errors) %>
Why is the errors variable not available locally in the view?
I can write:
<%= debug(params) %>
<%= debug(session) %>
but not:
<%= debug(errors) %>
Why is the errors variable not available locally in the view?
Assuming errors refers to validation errors, params and session apply to your entire request and are therefore made available to your controller and views. errors apply to a specific model that you have instantiated (e.g. a person who is missing a name or a post which is missing a title) so there is no request-wide list of errors.