Displaying 2 results from an estimated 2 matches for "myothermodel".
Did you mean:
anothermodel
2008 Jul 28
1
callback executed like after_save but after transaction
...odels -i #{self.id}`
end
# controller action delete
def delete
MyModel.find(params[:id]).update_attribute(:deleted_at, Time.now) #
after_save is called when the table
end
But in this situation:
# controller action new
def new
MyModel.transaction do
newmodel = MyModel.new
othermodel = MyOtherModel.new
... other code ...
newmodel.save!
othermodel.save!
end
end
after_save gets called inside the transaction, and so the database is
not up to date! I''ve looked into ActiveRecord::Observers but this also
faces the same problem. Is there any way around this?
--~--~---------~...
2006 Jan 25
9
connection_specification and adapter
Hi,
I wish to know, how those class work exactly, where
can I find the documentation? or can someone explain
to me how a connection is made via those class???
Thanks you very much!!!!
Saiho
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com