Forum: Ruby on Rails How to clone model's data

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Nuugii L. (Guest)
on 2008-11-25 07:14
Hey' guys.

How to clone model's data.
Ben J. (Guest)
on 2008-11-25 07:49
Nurzed L. wrote:
> Hey' guys.
>
> How to clone model's data.

Try some things out in your console, that would the best way to get your
answer. Try:

@obj.clone

@obj.dup

@obj.attributes


It really depends on what you are using the data for.
This topic is locked and can not be replied to.