Top "Before-save" questions

An ActiveRecord callback that is executed after validating an object but before writing it to the database.

Force Save as XLSM While Maintaining File Structure

So I am working with a XLTM file, and I want the user to make sure they save as XLSM. …

excel filenames before-save vba
How to "update_attributes" without executing "before_save"?

I have a before_save in my Message model defined like this: class Message < ActiveRecord::Base before_save lambda { …

ruby-on-rails ruby-on-rails-3 before-filter update-attributes before-save
Lock Cells after Data Entry

I have a spreadsheet that is edited by multiple users. To prevent tampering with previous data the cells are locked …

excel locking before-save vba
Is :on => :create valid for a before_save callback in Rails 3.2.3

As you know, before_save callbacks are executed prior to before_create callbacks. Therefore, some people have suggested that in …

ruby-on-rails activerecord ruby-on-rails-3.2 before-save
Rails - Get old value in before_save

I'm trying to get the old value in the before_save by adding "_was" to my value but it doesn't …

ruby-on-rails before-save
Yii on update, detect if a specific AR property has been changed on beforeSave()

I am raising a Yii event on beforeSave of the model, which should only be fired if a specific property …

php yii before-save