Questions tagged [partials]

Partials are often synonym for templates, which can even also be called partial templates.

Partials are often synonym for templates, which can even also be called partial templates.

763 questions
15
votes
2 answers

Render form partial in a different controller (not nested)

I have two models generated with generate scaffolding, one is a LogBook the other is LogEntry. I want to render the form partial for LogEntry on the LogBook show page. When I call render on the partial I get this error: undefined method…
vfilby
  • 9,938
  • 9
  • 49
  • 62
14
votes
3 answers

Trouble inserting a rails partial using JQuery

The following line of code: $("#comments_<%=@comment.post.id %>").append("<%= escape_javascript(render :partial => 'posts/comment', :locals => { :comment => @comment }) %>"); Is supposed to instert a partial as html inside the coments_xx div…
Diego Ocampo
  • 141
  • 1
  • 3
14
votes
4 answers

How do you do a for loop/for each in EJS?

I know it has to go inside <% %>, but I'm not sure if it's very different from a typical forEach/for loop. The documentation on the EJS site is pretty limited, so I came here. <% include ../../partials/header %>

List of all…

Tsardines
  • 883
  • 2
  • 8
  • 17
13
votes
1 answer

What file path would I use with ng-include?

My angular project's path is like this web server.py ##flask server program app static app.js controllers.js etc... templates index.html home.html index.html