0

I am trying to render contents of user_details\index.html.erb in my custom page home.html

here is my directory structure

apps
|
views
├───co_owners
├───layouts
├───pages
├───shared
└───user_details

the home.html.erb page is pages directory... and index.html.erb pages is in user_details directory

i am using <%= render :partial => 'user_details' %> to render it on my home page... but i am getting error ActionView::MissingTemplate in Pages#home

how can i do this?

1 Answer 1

1

As an answer in a previous your question

It is not a partial (starts with underscore), so you need render template. You also need the full path of the template, from the view directory:

<%= render template: 'user_details/index' %>

I suggest you read Layouts and Rendering in Rails

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for answer... i didnt recognize that as i had mad some directory changes...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.