In ruby there is a concept called method_missing, I am trying to implement the same in rails.
class GalleryController < ApplicationController
def gallery_home
end
def method_missing(m, *args)
render plain: "There is no method #{m}"
end
end
But still the default rails error page appears. Any pointers please where I am going wrong
EDIT: I am trying to display an nice custom error message, when the route does not match.
I don't want to show the user
The page you were looking for does not exist
.