Lighthouse has a new layout.
Prefer the old one? Return to the old layout,
and switch back any time from the link at the top of each page.
This project is archived and is in readonly mode.
Extend AR#save with :callback => false
#6632
Real world usecase:
User
- belongs_to project
Project
- has_many :users
class User < ActiveRecord::Base
before_create :update_project_user_action
def update_project_user_action
project.user_action_date = Date.today
project.save :validate => false
end
end
If I come back a month later or a fellow developer adds some
callbacks on Project or validations then my call might fail. My
callback does not care about the Project overall state, just the
specific field.
It could also be argued that #update_attribute should also be
given this property. Currently it skips validations but not
callbacks.
Reported by Brian Jensen ·
March 27th, 2011 @ 06:46 PM