small medium large xlarge

Generic-user-small
05 Feb 2015, 00:46
Gary Márquez (1 post)

At the end of first chapter when add another action with:

def another

render pdf: “contents”, template: “home/index”

end

and run test I get ActionView::MissingTemplate error because home/another view doesn’t exists… Why?

Thanks!

28aa4bd_pragsmall
18 Mar 2015, 06:53
José Valim (60 posts)

Gary, the template option expects a template with the given name to be found in your view. So for example, if you use “home/index”, it expects “app/views/home/index” to exist. Does that file exists?

If not, can you paste your renderer implementation and let us know which Rails version are you using? If you can publish the project somewhere, like Github for example, it is even better.

Thanks for reading!

You must be logged in to comment