This project is archived and is in readonly mode.
:model_callbacks and :validate_callbacks options (similar to :validate => false for Model.save())
-
Fred Wu
Thoughts anyone?
Here's a patch for model_callbacks. Since validation callbacks are called from ActiveModel, it requires more effort to make it work.
-
Fred Wu
Yes, they certainly are. :)
-
Fred Wu
- Tag changed from callback, callbacks, update_attribute, update_attributes, validate, validation to callback, callbacks, patch, update_attribute, update_attributes, validate, validation
Here is an updated patch.
Added ':model_callbacks' and ':validate_callbacks' options. model_callbacks option triggers callbacks on :save, :update, :destroy and :touch, and validate_callbacks option triggers varies validation callbacks. These options by default are set to true, so that backward compatibility is maintained. -
Fred Wu
- Title changed from Behaviour of update_attribute and update_attributes (set validation and callbacks) to [PATCH] :model_callbacks and :validate_callbacks options (similar to :validate => false for Model.save())
-
Fred Wu
- Fixed some issues and made all the tests pass.
- Rebased to the master.
-
Jeff Kreeftmeijer
- State changed from new to open
- Title changed from [PATCH] :model_callbacks and :validate_callbacks options (similar to :validate => false for Model.save()) to :model_callbacks and :validate_callbacks options (similar to :validate => false for Model.save())
- Tag set to callbacks, patch
Using the "patch" tag instead of prefixing the ticket title with "[PATCH]" to make sure patched tickets end up in the open patches bin. :)
-
Santiago Pastorino
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
