Maurício Linhares wrote:
> Would you like to remove the object that contains var3?
> 
> var3 isn' at the nested array, it's a nested property of an object
> that is in there.
> 
> If you wanted to remove it, it would be like this:
> 
> var1[0].var2.delete_at( 0 )
> 
> -
> Maur�o Linhares
> http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ 
> (en)
> 
> 
> 
> On Mon, Jan 26, 2009 at 5:50 AM, Ukrit Himakoon

not really what I want is removing element inside an array built from 
query (use in display purpose). but when I'm trying to delete the 
element inside database also deleted.

for more clearer explanation please see this:

I've got database contains stuff like this:

var1 - has_many var2

var2 - belongs to var1 and belongs to var2

var3 - has_many var2

So what I'm doing is

variable1 = var1.find(:all)

but I need only var1 which not contains some contents in var3 that's why 
I need to trace and remove from var3 element. any Idea?
-- 
Posted via http://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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to