I have the following configuration:
Windows XP with SP2 box
Ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Ruby Gem 1.3.1
Merb 1.0.3
SQLite 3.6.6.2
do_sqlite3-0.9.9
Mongrel 1.1.5

While using the Sandbox facility in interactive merb, my table records
got deleted. Here's what happened:
c:\ruby_bookshop>merb -i
Loading init file from c:/ruby_bookshop/config/init.rb
Loading c:/ruby_bookshop/config/environments/development.rb
 ~ Connecting to database...
 ~ Loaded slice 'MerbAuthSlicePassword' ...
 ~ Compiling routes...
 ~ Activating slice 'MerbAuthSlicePassword' ...
irb: warn: can't alias context from irb_context.
irb(main):001:0> Book.count
 ~ SELECT COUNT(*) FROM "books"
=> 3
irb(main):002:0> merb.open_sandbox!
Loading development environment in sandbox (Merb 1.0.3)
Any modifications you make will be rolled back on exit
=> [Merb::Orms::DataMapper]
irb(main):003:0> Book.all.destroy!
 ~ DELETE FROM "books"
=> true
irb(main):004:0> Book.count
 ~ SELECT COUNT(*) FROM "books"
=> 0
irb(main):005:0> merb.close_sandbox!
Modifications have been rolled back
=> nil
irb(main):006:0> Book.count
 ~ SELECT COUNT(*) FROM "books"
=> 0
irb(main):007:0> exit
c:\ruby_bookshop>

You will see right at the end, Book.count displays 0. I checked
outside interactive merb and all the records had got deleted.

Is this a bug or am I doing something wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to