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
classIndexController < ApplicationControllercall_to_a_function_that_does_not_existdefindexputs"we are here"endend
and register a route for it
# routes.rbget"/",to: 'index#index'
Expected behavior
I'd expect to see and error like this in logs or webpage
NameError: undefined local variable or method `call_to_a_function_that_does_not_exist' for IndexController:Class
Actual behavior
If views/index/index.erb.html exists, Rails displays that view (but clearly isn't executing our index method, "we are here" is not in logs). Otherwise it shows an error that says "The action 'index' could not be found for IndexController".
Steps to reproduce
Create a new Rails controller
and register a route for it
Expected behavior
I'd expect to see and error like this in logs or webpage
Actual behavior
If
views/index/index.erb.html
exists, Rails displays that view (but clearly isn't executing ourindex
method, "we are here" is not in logs). Otherwise it shows an error that says "The action 'index' could not be found for IndexController".System configuration
Rails version: 6.0.2.1
Ruby version: 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
The text was updated successfully, but these errors were encountered: