Hai guys. I have problem in Rails.. Can u help me? please..... My problem: I want to make code for maintenance database... I want like migration... can change to another version... so when I import some data, I must revert to before version.. example: file import 1 --> import to database... version 1 user1 add some data file import 2 --> import to database... version 2 user2 add some data file import 3 --> import to database... version 3 if file import 3 wrong data...., then I can change to version2 with some data form user2.(last data base before file import3 exceuted) do anybody know about it?? if must use plugin.. what are they?? Thank you. -- Wu You Duan --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hi, You can use Transaction functionality for the same Eg: User.transaction do .... .... end if anything fails in between, everything will be reverted -NAYAK On Wed, Jan 7, 2009 at 10:06 AM, anton effendi <wuyouduan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hai guys. > I have problem in Rails.. Can u help me? please..... > > My problem: > > I want to make code for maintenance database... I want like migration... > can change to another version... > so when I import some data, I must revert to before version.. > > example: > file import 1 --> import to database... version 1 > user1 add some data > file import 2 --> import to database... version 2 > user2 add some data > file import 3 --> import to database... version 3 > > if file import 3 wrong data...., then I can change to version2 with some > data form user2.(last data base before file import3 exceuted) > > > do anybody know about it?? if must use plugin.. what are they?? > > > Thank you. > > > -- > Wu You Duan > > > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
anton effendi wrote:> Hai guys. > I have problem in Rails.. Can u help me? please..... > > My problem: > > I want to make code for maintenance database... I want like migration... > can change to another version... > so when I import some data, I must revert to before version.. > > example: > file import 1 --> import to database... version 1 > user1 add some data > file import 2 --> import to database... version 2 > user2 add some data > file import 3 --> import to database... version 3 > > if file import 3 wrong data...., then I can change to version2 with some > data form user2.(last data base before file import3 exceuted) > > > do anybody know about it?? if must use plugin.. what are they??Have you looked at acts_as_versioned? I''m not totally sure what you''re trying to do but that might work for you. HTH Matt --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---