Reputation: 6384
I am using a rails mountable engine called 'Child' inside the application called 'Parent'.
I have a partial 'child/user/_index.html.erb'
Now I want to render this child's partial in parent controller. Is it possible?
Means I want to do something like
render :partial => 'child/user/index.html.erb'
Thanks
Upvotes: 4
Views: 3128
Reputation: 24851
I think you can just render user/index
ref http://edgeguides.rubyonrails.org/engines.html
The engine is unable to find the partial required for rendering the comments. Rails looks first in the application's (test/dummy) app/views directory and then in the engine's app/views directory. When it can't find it, it will throw this error. The engine knows to look for blorgh/comments/comment because the model object it is receiving is from the Blorgh::Comment class.
Upvotes: 0