On Feb 24, 3:52 am, Cyrus Dev <[email protected]>
wrote:
> How can we create new objects from hashes ?
>
depends what kind of object you want to create. You can't call
user.foo unless the user object has a foo method, and hashes don't. So
create an instance of something that does have a foo method. Exactly
what you create and how you use your hash when creating it is entirely
up to you.
Fred
> thanks ..
>
> Frederick Cheung wrote:
> > On 23 Feb 2009, at 08:48, Cyrus Dev wrote:
>
> >> Yes fred
>
> >> I modify that array and hash that is my question..
>
> >> Can I do that array like original like activ record array ? using any
> >> ruby or rails functions ?
>
> > Only if you create new objects from those hashes.
>
> > Fred
>
> --
> 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 [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
-~----------~----~----~----~------~----~------~--~---