jeudi 13 août 2015

How to render view in rails

i am using rails for my application.i have generated scaffold for crud operation. i have scaffold for product_lists. i have page called user_dashboard.html.erb here i want to render pages from product_lists.

i have user_dashboard.html.erb page in pages/ directory..i want to render index.html page from product_lists directory inside user_dashboard.html.erb. i have tried using render.. but its showing error here is what i have tried

<div class="panel-body">      
        <%= render 'product_lists' %>
</div>

error:

ActionView::MissingTemplate in Pages#user_dashboard

How can i solve this error and why is this raised?

Aucun commentaire:

Enregistrer un commentaire