Displaying 2 results from an estimated 2 matches for "comments_show".
2010 May 27
1
How to pass an Variable to an Partial?!?
...base table called : "comment" in which I save comments
users made to one Profil, identifed by the Profil ID which I also save
in this table.
My Idea was to invoke an partial in the View/profil/
show_profil.html.erb... something like:
<%= render :partial => "comments/comments_show" %>
But how can I find and show the comments with the ID of the used
Profil?!?!?
Can I handover the Profil_ID somehow and if so how can I use it?
It was hard for me to explain my problem and I hope this was
understandable.
Hope to get some Ideas and solutions.
--
You received this messa...
2010 Jun 06
2
How to make an SQL querey Within a partial, is that possilbe??
...h @profil.subtitle %>
</div>
</td>
</tr>
<tr>
......
......
....
<div style="width: 500px; margin-top: 20px;">
<h2>Kommentare</h2>
<%= render :partial => "comments/
comments_show", :locals=>{:profil_id=>@profil.id} %>
</div>
and there I tried to call a partial which display the comments...
And that my problem...
I hand over the profil_id (which works fine) but I ve NO idea how and
where to include the Search to find the comments with the same id...
i...