Fix restore method for paranoid models
Do not try to update confirmed_hide_at column from models without this column.
This commit is contained in:
committed by
voodoorai2000
parent
db38a87205
commit
458fb750eb
@@ -28,7 +28,7 @@ module ActsAsParanoidAliases
|
||||
def restore(opts = {})
|
||||
return false unless hidden?
|
||||
super(opts)
|
||||
update_attribute(:confirmed_hide_at, nil)
|
||||
update_attribute(:confirmed_hide_at, nil) if self.class.column_names.include? "confirmed_hide_at"
|
||||
after_restore
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user