Hello,
I'm quite new to Rails and english is even not my first language, so
please excused nescience and clerical mistake.
I'll try to explain my problem as good as possible.

I try to implement a page where a profil is shown, this is searched by
ID.
within this profil page I want to include the comments that refer to
this profil.
In the back I have to database tabels, the one "profiles" and a second
"comments".
In the second one I ve the column "profil_id" because my Idea was to
search for the Id of the profil which is shown and than to display the
comments in which the profil_id is the same.

I already tried to implement this Idea but I hit some problems:

the profil page works fine.

show.erb.html:
                <tr>
                        <td class="headline">Titel</td>
                        <td>
                                <div class="table-col">
                                        <%= h @profil.title %>
                                </div>
                        </td>
                </tr>
                <tr>
                        <td class="headline"></td>
                        <td>
                                <div class="table-col">
                                        <%= 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...

in the file  _comments_show.erb.html i ll tried something like that:

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to