CakePHP Personal Notes

Just links and things as I learn my way around CakePHP

https://github.com/mcurry/cakephp_static_user – didn’t work

Realised that the acl plugin should be in app/Plugin not /plugins
http://book.cakephp.org/2.0/en/plugins.html

Get data from another controller.
http://stackoverflow.com/questions/9205540/cakephp-how-to-retrieve-data-from-another-model-in-controller

$this->Result->Quiz->Question->find('count')

This found all the questions – not, as I first thought, the questions for that quiz.

http://devblog.springest.com/how-to-find-related-data-in-habtm-models/
Helped me to

    public function number_of_questions()
    {
        $x = $this->Question->Quiz->find('all',array(
            'conditions' => array(
                'Quiz.id' => $this->id
            )));
        return(count($x[0]['Question']));        
    }

Not sure what the 0 should be.  Not very “CakePHP ish”. Then

$this->Quiz->number_of_questions()

Uploads:
https://github.com/blueimp/jQuery-File-Upload

Pinot Chardonnay, day 22

image

Shoved in some potassium sorbate, which appears to be a microbe inhibitor, then a fining agent (#5 Isinglass Ichtyocolle). A good stir, then off to the utility room to clear for six days. We think it smells very much like wine, so we’re feeling very positive about drinking it.

Next Saturday it will hopefully be clear, and I can decant it in to the demijohns. If it is not clear, I can either wait or rack it off from them another day, and get a filter kit next time around.

Once the bucket is free, onwards with the IPA!

Rice and Pinot

IMG_4881
The rice and raisin after filtering

Pinot Chardonnay

Day 20 of the Pinot Chardonnay.  Not much to report other than it has moved along exactly as  per the instructions. The brew belt keeping the carboy at a pretty constant 20°C and the gravity was right on target.  It now looks like wine and pretty much tastes like wine.  I   I added potassium metbisulphate (“antioxidant, antioxidase and antiseptic agent against micro-organisms. It gives better phenol stabilisation” – it may also stop fermentation, but my brief researches were inconclusive on that).  It now has to be stirred every few hours to degas before adding the finings and putting in its last resting place before bottling next week.

DateSpecific GravityAlcohol Content
30th December 20131,0800%
6th January 20141,00210.3 %
18th January 201499411.4%

Rice and Raisin

I also moved along the rice and raisin.  When I decanted it in to a demijohn I found I had slightly underestimated the volume.  Lesson learned there.  The gravity was 1.040 so I whipped up some 1040 sugar water and popped it in.  The rice wine has a lovely condensed milk colour at the moment, so I suspect it will be rather pale once the fermentation has worked itself out.

Rice and Raisin, 2014-01-11

DateSpecific GravityAlcohol Content
12th January 20141,0900%
18th January 20141,0406.6%
15th February 201499213%

Remnants, and the bag I used for filtering
Remnants, and the bag I used for filtering

A different yeast product…

500D_2064

Last summer we stayed with a friend in Cornwall.  Each day he wowed us with newly fresh bread that seemed to flow effortlessly from his kitchen. 
He waxed lyrical about the book he used – Short and Sweet by Dan Lepard. I added the book to my Amazon wish list and waited for Christmas.  The book did not appear!  But like the beer kit, I just received it as a gift from one of my grateful rowers.

My bread in the past has been OK, but not inspiring.  But I followed the “easy bread” recipe in the book and it blew us all away.  I guess that I must have been over-kneading it in the past.  the kids are keen for me to make their sandwich bread for Tuesday, so the challenge has been set.