fix: [decaying:.json] Restored working behavior of `.json` views

pull/5032/head
mokaddem 2019-08-19 12:07:48 +02:00
parent 7be53e6b5b
commit b6e84f74d4
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
4 changed files with 5 additions and 3 deletions

View File

@ -141,7 +141,7 @@ class DecayingModelController extends AppController
}
$passedArgsArray = $this->__setIndexFilterConditions($this->passedArgs);
$this->set('passedArgsArray', $passedArgsArray);
$this->set('decayingModel', $this->paginate());
$this->set('decayingModels', $this->paginate());
}
public function add()

View File

@ -85,7 +85,7 @@
<th class="actions"><?php echo __('Actions');?></th>
<?php endif; ?>
</tr><?php
foreach ($decayingModel as $item): ?>
foreach ($decayingModels as $item): ?>
<tr>
<td class="short"><a href="<?php echo $baseurl."/decayingModel/view/".$item['DecayingModel']['id']; ?>"><?php echo h($item['DecayingModel']['id']); ?>&nbsp;</a></td>
<td class="short">

View File

@ -0,0 +1,2 @@
<?php
echo (json_encode($decayingModels));

View File

@ -1,2 +1,2 @@
<?php
echo (json_encode($decayingModel));
echo (json_encode($decaying_model));