On 27 May 2010 11:20, happysmiley
<toniz789-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
wrote:> Hello,
> I''m new in Rails and I''m Trying to implement a plattform
were
> authorized people can apply Profiles to a special topic.
> The profil can be identified by the ID and the title in the data
> base.
> So in the view/profil/show_profil.html.erb the infomation of one
> Profil are perfektly shown.
>
> My problem:
> I have an data 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?
Have a look at the docs at
http://rails.rubyonrails.org/classes/ActionController/Base.html to see
how to pass data to a partial. A google search for render partial
puts this as the first hit.
Colin
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.