On Jun 6, 8:54 am, happysmiley <[email protected]> wrote:
>
> 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.

You should have an association between profiles and comments (profile
has_one :comment or has_many :comments) and then profile.comment or
profile.comments will be the comment(s) you are looking for

Fred

-- 
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