Permalink
Browse files

Honour value of 'disable_updated_at' paramter

Honour value of 'disable_updated_at timestampable behaviour parameter.
  • Loading branch information...
1 parent 10fe1be commit aab46745bdac4e7e65a4fee5ed1bbac6cac7a1f5 @exptom exptom committed Mar 20, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 generator/lib/behavior/SoftDeleteBehavior.php
@@ -94,7 +94,7 @@ public function preDelete($builder)
$script = "if (!empty(\$ret) && {$builder->getStubQueryBuilder()->getClassname()}::isSoftDeleteEnabled()) {";
// prevent updated_at from changing when using a timestampable behavior
- if ($this->getTable()->hasBehavior('timestampable')) {
+ if ($this->getTable()->hasBehavior('timestampable') && ($this->getTable()->getBehavior('timestampable')->getParameter('disable_updated_at') === 'false')) {
$script .= "
\$this->keepUpdateDateUnchanged();";
}

0 comments on commit aab4674

Please sign in to comment.