Use the lookup_context to check if a view exists. The first argument is the name of the view (file), and the second argument is the directory following /app/views. It is possible to specify an array to search in multiple directories.

lookup_context.exists?('my_view_name', 'pages')