Noah Clark
Noah Clark

Reputation: 8131

Trying to Render Template and Getting ActionView::MissingTemplate

Here is what I see when I try to load the page (http://localhost:3000/analytics):

enter image description here

I have a file named _order_charts.html.erb in my static_pages directory. What am I doing wrong?

Upvotes: 0

Views: 129

Answers (1)

TheIrishGuy
TheIrishGuy

Reputation: 2573

<%= render 'static_pages/order_charts' %>

or

<%= render partial: 'static_pages/order_charts' %>

You do not need to include the underscore, rails is smart like that.

Upvotes: 2

Related Questions