On 29 November 2011 12:47, Somnath Mallick <lists@ruby-forum.com> wrote:
> OK.. I will give it a try!
>
> I think i have to redo all the commands and add data all over again!
If you have a lot of data to load manually you can do it by putting
code in db/seeds.rb then running
rake db:seed
> ...
> But how come coming out of the sandbox console deletes data from the
> database? Database values should be persistent right? That is the whole
> idea of a DB, or am i missing something here?
Did you not see the comment displayed when you opened the console in a sandbox?
$ rails console --sandbox
Loading development environment in sandbox (Rails 3.1.3)
Any modifications you make will be rolled back on exit
That is the whole point of the sandbox, to play without affecting the database.
Colin
>
> --
> 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+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment