KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Class User before_save :set_searchable def set_searchable self.searchable = true if self.status == :active end end >> u = User.last >> u.save false u.save always return false. If i remove the before_save it works also if i give a return true in before_save it works so do i need to give return statements in before_save ? will ActiveRecord saves an object if the before_save returns false ? Where can i see a full documentation regarding callbacks and its workflow . Thanks in advance
Tags (comma-separated)
Save Edits
Cancel