Who to rollbacking the database when system is switched off

Hi,

Can any one help me

who to rollbacking the database when system is switched off.

i.e. how to use rollback and commit in ruby

Santosh R patil wrote:

Hi,

Can any one help me

who to rollbacking the database when system is switched off.

i.e. how to use rollback and commit in ruby

look at transactions:
http://api.rubyonrails.org/classes/ActiveRecord/Transactions/ClassMethods.html#M000681

Your code works within the transaction {block} and automatically commits
(or rollbacks ) as needed

ilan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs