Re: conditions in $belongsTo

2012-06-17 Thread Jeremy Burns | Class Outfit
I hope I'm not missing the point here, but what I do is have a vanilla $belongsTo/$hasMany/whatever that has no conditions and is called the same as the remote model. Then I set up alternatives that include the conditions and are named appropriately and are used when needed, for example: public

Generate test mock for model

2012-06-17 Thread Điển vũ
$this-> Posts = $this->generate('Posts', array( 'models' => array( 'Post' => array('exists') ) )); $this->Posts->Post ->expects($this->once())->method('exists')->will($this->returnValue(false)); $this->testAction('/user/posts/edit/' . $post['Post']['id'], array(. *I expects a excep

Re: Cookie not saving and I can't view cookies in IE8

2012-06-17 Thread Daniel
I took out the line that sets the domain and it worked. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, se

Re: Check table for a particular entry

2012-06-17 Thread JonStark
Ok, almost there, just need a little help with Set:: I'm using Set::extract('/Follower/UsersUser', $user) to get all the data from the association table of a given user, wich when debugged produces an array like this one : array( (int) 0 => array( 'UsersUser' => array(

Re: Cookie not saving and I can't view cookies in IE8

2012-06-17 Thread Tilen Majerle
$this->Cookie->time = '365 Days'; you missed "+" so $this->Cookie->time = '+365 Days'; -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/6/17 Daniel > $this->Cookie->time = '365 Days'; -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Cookie not saving and I can't view cookies in IE8

2012-06-17 Thread Daniel
I deleted my browsing history and I was able to view cookies in IE8. My cookie was not there, so Cake / PHP is not writing cookies. I tried setting the domain as follows: $this->Cookie->domain = $_SERVER['SERVER_NAME']; ... which sets it to "localhost". And then I tested again and I looked at t