Re: get actions

2013-01-31 Thread Rodrigo Rodrigues Moyle
Because of CakePHP does not use PHP namepscpaces a best practice is to prefix all your classes in a plugin with plugin name, if plugin name is customer change your class to CustomerAccountController or CustomerAccountmodel. On Tuesday, January 29, 2013 11:51:04 AM UTC-2, Igor Padovan da Silva wr

Re: CakeTestCase, output and graceful failing

2013-01-31 Thread Rodrigo Rodrigues Moyle
Use --testdox-text in shell running, this allow to all tests to run with wich one is failing. On Tuesday, January 29, 2013 4:28:32 PM UTC-2, Vanja Dizdarević wrote: > > Pretty newb at Testing, but I wish to create a list-of-feature-test with > some useful output. > > I have created a test case f

Re: Using variable from controller in model

2013-01-31 Thread Rodrigo Rodrigues Moyle
Use $this->set('noslug', 1); instead. On Tuesday, January 29, 2013 12:41:42 PM UTC-2, MetZ wrote: > > Hi all. > > I am struggling passing a variable to my before save function in my User > model. > > Controller: > $this->User->read(null, $data['user_id']); > $this->User->set(array

Re: Router::connect with :action

2012-08-09 Thread Rodrigo Rodrigues Moyle
There is not a option, if you define a route with /:action you are telling CakePHP the :action param is required. Maybe you try make this route using a custom class. http://book.cakephp.org/2.0/en/development/routing.html#custom-route-classes -- You received this message because you are subscri

Re: Mock testing , don't save data.

2012-04-26 Thread Rodrigo Rodrigues Moyle
If you use a mock on model, the data is not saved to database and the findByGuest is always false. -- 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 que

Re: Identifying field in Authentication

2012-04-15 Thread Rodrigo Rodrigues Moyle
USe the scope option in FormAuthenticate http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#configuring-authentication-handlers Em domingo, 15 de abril de 2012 06h00min44s UTC-3, hoss7 escreveu: > > hi > Username and Password is default filed for identifying users in

Re: CakePHP Controller Testing with DB Sessions

2012-03-29 Thread Rodrigo Rodrigues Moyle
Mock you SessionComponent to not access the database. -- 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, send

Re: How to test this controller?

2012-03-28 Thread Rodrigo Rodrigues Moyle
Use testAction() http://book.cakephp.org/2.0/en/development/testing.html#testing-controllers -- 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

Re: Share session with Magento

2012-03-19 Thread Rodrigo Rodrigues Moyle
You just need to name CakePHP session cookie as same with Magento. Em sexta-feira, 16 de março de 2012 17h38min50s UTC-3, Luchi escreveu: > > Hi, > > Basically what I want to do is to share my frontend session of Magento > to an application deployed in CakePHP. > The structures are: > > public

Re: unlink error from FileEngine.php

2012-03-09 Thread Rodrigo Rodrigues Moyle
Try adding a mask with correct permission to you cache config: 'mask' => 0664 Em sexta-feira, 9 de março de 2012 12h21min16s UTC-3, heohni escreveu: > > Hi, > > from time to time I get this error message: > > *Warning*: > unlink(D:\SVN-Homes\...\cache_sql_properties_of_the_week_premium_5) [ > fu

Re: How to link to a non cake php page, and where to put it?

2012-03-09 Thread Rodrigo Rodrigues Moyle
If you just need to put a PHP file on your projeto, just put the file on webroot folder at app/webroot/pages/SkillsMat/edit_scores.php and your link will work correctly. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions sit

Re: Model::updateCounterCache() bug?

2012-03-09 Thread Rodrigo Rodrigues Moyle
Please, show you table schema and model association setup. -- 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,

Re: Undefined controller: Controller!

2012-03-09 Thread Rodrigo Rodrigues Moyle
When calling with $this->redirect( $this->referer() ), what is the result of $this->referer()? -- 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 questio

Re: [cake 2.x] Session.cookieTimeout won't be Session.timeout by default

2012-03-09 Thread Rodrigo Rodrigues Moyle
Yes, its a bug, report this on lighthouse: http://cakephp.lighthouseapp.com/ -- 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 unsubscri

Re: How to use a session var inside $hasMany condition ?

2012-03-09 Thread Rodrigo Rodrigues Moyle
Add the ContainableBehavior to your AppModel class, and when using find: $model->find('all', array( 'contain' => array( 'Comment' => array( 'conditions' => array( 'Comment.UEB_FKID_SPR_ID' => CakeSession::read('Config.languageID' ) ) ) ))) -- Our newest site for the community: CakePHP Video Tuto

Re: "Mass Assignment Vulnerability" - protection in Cake

2012-03-08 Thread Rodrigo Rodrigues Moyle
I always use save($data, array('fieldList' => array())) to protect against this problem regardless of the SecurityComponent. Em terça-feira, 6 de março de 2012 18h06min37s UTC-3, nabeel escreveu: > > Hi all, > > I'm sure we've all heard about what happened with RoR and Github just > recently -

Re: Model is reading from the wrong table ??

2012-03-08 Thread Rodrigo Rodrigues Moyle
You could not use the model Eigenschaftsarten using static access, use this: ClassRegistry::init('Eigenschaftsarten')->find(...) Em quinta-feira, 8 de março de 2012 05h59min45s UTC-3, heohni escreveu: > > Hi, > > I have this model 'Eigenschaftsarten' > > class Eigenschaftsarten extends AppModel {

Re: Error deprecated

2012-03-08 Thread Rodrigo Rodrigues Moyle
You need to disable E_DEPRECATED warning on your php.ini Or update your CakePHP to 2.1 Em quinta-feira, 8 de março de 2012 08h11min15s UTC-3, Felipe Silveira escreveu: > > PHP Version 5.3.2 > Cake @version $Revision: 7805 $ (1.3). > > On Mar 7, 8:47 pm, Miles J wrote: > > What CakePHP

Re: Error: Index.phpController could not be found

2012-03-07 Thread Rodrigo Rodrigues Moyle
Check the DirectoryIndex is equal: DirectoryIndex index.html index.php And check your AllowOverride is set do all, without this the .htaccess does not work. Em quarta-feira, 7 de março de 2012 03h20min15s UTC-3, amg55nj escreveu: > > Ok I'll try to see what is wrong with my Apache server. You w

Re: How lo load a model from a model?

2012-03-06 Thread Rodrigo Rodrigues Moyle
Use: $this->load('Objeckt); instead of App::uses() Em terça-feira, 6 de março de 2012 08h14min42s UTC-3, heohni escreveu: > > Hi, > > class DetailsController extends AppController{ > var $name = 'Detail'; > > public function index($id){ > if($id){ > $results = $this->Detail->find('first', $co

Re: Scaffold Multi join tables

2012-03-05 Thread Rodrigo Rodrigues Moyle
You could name whatever you want, and use a model on this table. Em segunda-feira, 5 de março de 2012 07h49min19s UTC-3, Walter Raponi escreveu: > > Hi guys, > i finally started my first project with cake! > Have been reading a lot about it but now in real world have a great > problem! > > I'

Re: Having issue with AUTH in 2.1

2012-02-29 Thread Rodrigo Rodrigues Moyle
You need to put element sql_dump on your ajax layout too Em terça-feira, 28 de fevereiro de 2012 11h30min07s UTC-3, heohni escreveu: > > I have debug 2. but it will not return a sql statement, it's an ajax > based request anyway > > On 28 Feb., 14:02, Rodrigo Rodrigues Moyle

Re: Having issue with AUTH in 2.1

2012-02-28 Thread Rodrigo Rodrigues Moyle
Set debug to 2 Em terça-feira, 28 de fevereiro de 2012 06h55min25s UTC-3, heohni escreveu: > > well, if I do it like the book says, I get no sql error any more, but > the if ($this->Auth->login()) fails without any comment. > In this case, how can I get the sql statement debugged which is > run

Re: Issues with join

2012-02-27 Thread Rodrigo Rodrigues Moyle
$conditions = array('Formula.formulasId' => $id); $fields = array( 'materials.description', 'formula.formulasId, formula.materialsId, formula.weight'); $instructions = $this->Formula->find('all', array('conditions' => $c

Re: Problem with findI('list')

2012-02-24 Thread Rodrigo Rodrigues Moyle
Use virtualFields! http://book.cakephp.org/2.0/en/models/virtual-fields.html Em sexta-feira, 24 de fevereiro de 2012 17h28min10s UTC-2, Łukasz escreveu: > > Hi everybody! > > I am trying to fetch data with find('list') function and when my > "fields" attribute looks like array('User.id', 'User,c

Re: Media Plugin of David Persson is for cake 1.3 and for cake 2.0?

2012-02-23 Thread Rodrigo Rodrigues Moyle
Have you tried this plugin: https://github.com/josegonzalez/upload/tree/2.0 -- 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 unsubscrib

Re: Retrieve all errors message from model validators

2012-02-16 Thread Rodrigo Rodrigues Moyle
Which version are you using? On cake 1.3 this is the default behavior. But on cake 2.0 the default is return all errors if none of then have the last = true -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.

Re: Undefined index with associated afterFind()

2012-02-16 Thread Rodrigo Rodrigues Moyle
A better way is pre-calculate the values and save on database. -- 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 gr

Re: restricting afterFind() to one method

2012-02-16 Thread Rodrigo Rodrigues Moyle
Create a custom finder for this controller on your model and use only on this controller: http://book.cakephp.org/2.0/en/models/retrieving-your-data.html#creating-custom-find-types -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Que

Re: Send user to specific controller/action from front page?

2012-02-13 Thread Rodrigo Rodrigues Moyle
Use the redirect routing http://book.cakephp.org/2.0/en/development/routing.html#redirect-routing -- 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 ques

Re: Helper aliasing acting weird in 2.1 Beta

2012-02-13 Thread Rodrigo Rodrigues Moyle
Did you try this: class PdfHelper extends AppHelper { public $helpers = array( "Table" => array( "className" => "PdftableHelper" ) ); } -- 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 hel

Re: Dynamically remove a helper in a controller

2009-02-04 Thread Rodrigo Rodrigues Moyle
Cake automatically load the helpers defined in app_controller even if you define var $helpers in especific controller. On Wed, Feb 4, 2009 at 9:26 AM, maxmil wrote: > > I have a situation where i want a certain helper included in all of my > controllers except one. > > I would like to be able to

Re: Use the dreaded requestAction()... or use something else?

2009-02-02 Thread Rodrigo Rodrigues Moyle
You try to use saveAll? On Mon, Feb 2, 2009 at 10:16 AM, Graham Weldon wrote: > > > If some association exists between these objects, you can do something > like: > > $this->User->save($this->data); > $this->User->Site->save(array('Site' => array( > 'user_id' => $this->User->id, > // --- a