On Dec 3, 1:20 pm, Dharmdip Rathod <[EMAIL PROTECTED]>
wrote:
> Hi ,
>
> i am facing problem while i am writing code
> e.g.
>
>  People.find_by_id(params[:id])
>  comment.find_by_id(params[:id])
>
> when this execute it will delete only one record from the database which
> it get first. It will keep other records same.Is there any alternative
> to delete all records based this method.
>
> i tried with people=People.find(:all, :conditions=>["id=?",params[:id]])
> but result is same.
>
This doesn't really make sense to me. There is only one record for a
given value of the id column (or rather rails assumes that id is your
primary key) so what were you expecting?

Fred

> please help.........
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
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